diff options
author | Salim Afiune <afiune@chef.io> | 2016-12-22 10:10:15 -0500 |
---|---|---|
committer | Salim Afiune <afiune@chef.io> | 2016-12-22 12:43:10 -0500 |
commit | 134d02990eeb61ee1f8df124ed726e370cbb0187 (patch) | |
tree | 2d674459e934d00bf7ac8a174b7f48c4ccfdf7ef /spec | |
parent | 1b60195f4cb7ec5414ceb8543fc9a41c1ba4b73b (diff) | |
download | chef-134d02990eeb61ee1f8df124ed726e370cbb0187.tar.gz |
Create a new blank Resource instead of transforming it
Signed-off-by: Salim Afiune <afiune@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource_reporter_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb index e896aac4d7..ccd7087c0b 100644 --- a/spec/unit/resource_reporter_spec.rb +++ b/spec/unit/resource_reporter_spec.rb @@ -267,8 +267,8 @@ describe Chef::ResourceReporter do context "when the new_resource is sensitive" do before do - @execute_resource = Chef::Resource::Execute.new("my sensitive execute block") - @execute_resource.name('sensitive-resource') + @execute_resource = Chef::Resource::Execute.new("sensitive-resource") + @execute_resource.name("sensitive-resource") @execute_resource.command('echo "password: SECRET"') @execute_resource.sensitive(true) @resource_reporter.resource_action_start(@execute_resource, :run) @@ -280,12 +280,12 @@ describe Chef::ResourceReporter do @first_update_report = @report["resources"].first end - it "resource_name in prepared_run_data should be transformed" do - expect(@first_update_report["name"]).to eq('*sensitive*') + it "resource_name in prepared_run_data should be the same" do + expect(@first_update_report["name"]).to eq("sensitive-resource") end - it "resource_command in prepared_run_data should be transformed" do - expect(@first_update_report["after"]).to eq({:command=>"*sensitive*"}) + it "resource_command in prepared_run_data should be blank" do + expect(@first_update_report["after"]).to eq({ :command => "sensitive-resource" }) end end |