From f8f147e794ad305bb8f2dbf5e3a612f0659834ba Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 8 Apr 2014 15:04:55 -0700 Subject: Add success/fail groups --- spec/acceptance/abs_spec.rb | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'spec/acceptance/abs_spec.rb') diff --git a/spec/acceptance/abs_spec.rb b/spec/acceptance/abs_spec.rb index 0921497..eeae89b 100644 --- a/spec/acceptance/abs_spec.rb +++ b/spec/acceptance/abs_spec.rb @@ -1,27 +1,29 @@ require 'spec_helper_acceptance' describe 'abs function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - it 'should accept a string' do - pp = <<-EOS - $input = '-34.56' - $output = abs($input) - notify { $output: } - EOS + describe 'success' do + it 'should accept a string' do + pp = <<-EOS + $input = '-34.56' + $output = abs($input) + notify { $output: } + EOS - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 34.56/) + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: 34.56/) + end end - end - it 'should accept a float' do - pp = <<-EOS - $input = -34.56 - $output = abs($input) - notify { $output: } - EOS + it 'should accept a float' do + pp = <<-EOS + $input = -34.56 + $output = abs($input) + notify { $output: } + EOS - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 34.56/) + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: 34.56/) + end end end end -- cgit v1.2.3