Skip to content

Commit

Permalink
Merge pull request #517 from DavidS/try_get_value-acceptance
Browse files Browse the repository at this point in the history
(MAINT) fix up try_get_value acceptance test
  • Loading branch information
tphoney committed Sep 2, 2015
2 parents 64267eb + 5ef5c66 commit 6a1afae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/acceptance/try_get_value_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

describe 'try_get_value function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'success' do
it 'try_get_valuees a value' do
it 'gets a value' do
pp = <<-EOS
$data = {
'a' => { 'b' => 'passing'}
}
$tests = try_get_value($a, 'a/b')
$tests = try_get_value($data, 'a/b')
notice(inline_template('tests are <%= @tests.inspect %>'))
EOS

Expand All @@ -25,11 +25,11 @@
'a' => { 'b' => 'passing'}
}
$tests = try_get_value($a, 'c/d', 'using the default value')
$tests = try_get_value($data, 'c/d', 'using the default value')
notice(inline_template('tests are <%= @tests.inspect %>'))
EOS

apply_manifest(pp, :expect_failures => true) do |r|
apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stdout).to match(/using the default value/)
end
end
Expand Down

0 comments on commit 6a1afae

Please sign in to comment.