summaryrefslogtreecommitdiff
path: root/spec/acceptance/bool2num_spec.rb
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-04-08 15:04:55 -0700
committerHunter Haugen <hunter@puppetlabs.com>2014-04-08 15:04:55 -0700
commitf8f147e794ad305bb8f2dbf5e3a612f0659834ba (patch)
tree9b8b2093204c8ce56d7befdef4cef673fbc479b7 /spec/acceptance/bool2num_spec.rb
parentfcbc4b59a69c62239d15aa11ce7fccaeb93da9cf (diff)
Add success/fail groups
Diffstat (limited to 'spec/acceptance/bool2num_spec.rb')
-rw-r--r--spec/acceptance/bool2num_spec.rb40
1 files changed, 21 insertions, 19 deletions
diff --git a/spec/acceptance/bool2num_spec.rb b/spec/acceptance/bool2num_spec.rb
index 5bdb452..1cbd88d 100644
--- a/spec/acceptance/bool2num_spec.rb
+++ b/spec/acceptance/bool2num_spec.rb
@@ -1,30 +1,32 @@
require 'spec_helper_acceptance'
describe 'bool2num function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
- ['false', 'f', '0', 'n', 'no'].each do |bool|
- it 'should convert a given boolean, #{bool}, to 0' do
- pp = <<-EOS
- $input = #{bool}
- $output = bool2num($input)
- notify { $output: }
- EOS
+ describe 'success' do
+ ['false', 'f', '0', 'n', 'no'].each do |bool|
+ it 'should convert a given boolean, #{bool}, to 0' do
+ pp = <<-EOS
+ $input = #{bool}
+ $output = bool2num($input)
+ notify { $output: }
+ EOS
- apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to match(/Notice: 0/)
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: 0/)
+ end
end
end
- end
- ['true', 't', '1', 'y', 'yes'].each do |bool|
- it 'should convert a given boolean, #{bool}, to 1' do
- pp = <<-EOS
- $input = #{bool}
- $output = bool2num($input)
- notify { $output: }
- EOS
+ ['true', 't', '1', 'y', 'yes'].each do |bool|
+ it 'should convert a given boolean, #{bool}, to 1' do
+ pp = <<-EOS
+ $input = #{bool}
+ $output = bool2num($input)
+ notify { $output: }
+ EOS
- apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to match(/Notice: 1/)
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: 1/)
+ end
end
end
end