summaryrefslogtreecommitdiff
path: root/spec/acceptance/abs_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/acceptance/abs_spec.rb')
-rw-r--r--spec/acceptance/abs_spec.rb36
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