Skip to content

Commit

Permalink
Add test for using renamed resources inside rspec its blocks
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Danna <steve@chef.io>
  • Loading branch information
stevendanna committed Sep 19, 2016
1 parent e9debcb commit ae411b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/functional/inspec_exec_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
out = inspec('exec ' + File.join(profile_path, 'dependencies', 'resource-namespace'))
out.stderr.must_equal ''
out.exit_status.must_equal 0
out.stdout.force_encoding(Encoding::UTF_8).must_include "Summary: \e[32m5 successful\e[0m, \e[31m0 failures\e[0m, \e[37m0 skipped\e[0m\n"
out.stdout.force_encoding(Encoding::UTF_8).must_include "Summary: \e[32m7 successful\e[0m, \e[31m0 failures\e[0m, \e[37m0 skipped\e[0m\n"
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@
describe resource('profile_c', 'gordon_config') do
its('version') { should eq('1.0') }
end

describe resource('profile_c', 'gordon_config') do
its('version') { should eq(gordy_config.version) }
end

describe resource('profile_c', 'gordon_config') do
its('version') { should eq(resource('profile_c', 'gordon_config').version) }
end

end

0 comments on commit ae411b3

Please sign in to comment.