diff options
author | Hunter Haugen <hunter@puppetlabs.com> | 2014-04-08 15:04:55 -0700 |
---|---|---|
committer | Hunter Haugen <hunter@puppetlabs.com> | 2014-04-08 15:04:55 -0700 |
commit | f8f147e794ad305bb8f2dbf5e3a612f0659834ba (patch) | |
tree | 9b8b2093204c8ce56d7befdef4cef673fbc479b7 /spec/acceptance/abs_spec.rb | |
parent | fcbc4b59a69c62239d15aa11ce7fccaeb93da9cf (diff) | |
download | puppet-stdlib-f8f147e794ad305bb8f2dbf5e3a612f0659834ba.tar.gz puppet-stdlib-f8f147e794ad305bb8f2dbf5e3a612f0659834ba.tar.bz2 |
Add success/fail groups
Diffstat (limited to 'spec/acceptance/abs_spec.rb')
-rw-r--r-- | spec/acceptance/abs_spec.rb | 36 |
1 files changed, 19 insertions, 17 deletions
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 |