diff options
author | Claire McQuin <claire@getchef.com> | 2015-09-17 10:01:02 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2015-09-17 10:01:02 -0700 |
commit | fbd4375eb898b6a0e1a3d55dfe1a91e4c1c26d8a (patch) | |
tree | 00b8a8bb053d783fa53f64df6afda47f97f69da9 /spec/integration/recipes | |
parent | e9be737dd9b600a387e36bf2344f565e3804d3ef (diff) | |
download | chef-fbd4375eb898b6a0e1a3d55dfe1a91e4c1c26d8a.tar.gz |
Rename Chef::Resource#current_resource -> Chef::Resource#current_valuemcquin/chef-3897
Diffstat (limited to 'spec/integration/recipes')
-rw-r--r-- | spec/integration/recipes/resource_load_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/integration/recipes/resource_load_spec.rb b/spec/integration/recipes/resource_load_spec.rb index c29b877b59..556201efd8 100644 --- a/spec/integration/recipes/resource_load_spec.rb +++ b/spec/integration/recipes/resource_load_spec.rb @@ -63,17 +63,17 @@ describe "Resource.load_current_value" do end it "current_resource is passed name but not x" do - expect(resource.current_resource.x).to eq 'loaded 2 (name=blah)' + expect(resource.current_value.x).to eq 'loaded 2 (name=blah)' end - it "resource.current_resource returns a different resource" do - expect(resource.current_resource.x).to eq 'loaded 2 (name=blah)' + it "resource.current_value returns a different resource" do + expect(resource.current_value.x).to eq 'loaded 2 (name=blah)' expect(resource.x).to eq 'desired' end - it "resource.current_resource constructs the resource anew each time" do - expect(resource.current_resource.x).to eq 'loaded 2 (name=blah)' - expect(resource.current_resource.x).to eq 'loaded 3 (name=blah)' + it "resource.current_value constructs the resource anew each time" do + expect(resource.current_value.x).to eq 'loaded 2 (name=blah)' + expect(resource.current_value.x).to eq 'loaded 3 (name=blah)' end it "the provider accesses the current value of x" do @@ -94,7 +94,7 @@ describe "Resource.load_current_value" do } it "i, name and d are passed to load_current_value, but not x" do - expect(resource.current_resource.x).to eq 'loaded 2 (d=desired_d, i=desired_i, name=blah)' + expect(resource.current_value.x).to eq 'loaded 2 (d=desired_d, i=desired_i, name=blah)' end end @@ -112,7 +112,7 @@ describe "Resource.load_current_value" do } it "i, name and d are passed to load_current_value, but not x" do - expect(resource.current_resource.x).to eq 'loaded 2 (d=desired_d, i=desired_i, name=blah)' + expect(resource.current_value.x).to eq 'loaded 2 (d=desired_d, i=desired_i, name=blah)' end end end @@ -160,10 +160,10 @@ describe "Resource.load_current_value" do context "and a child resource class with no load_current_value" do it "the parent load_current_value is used" do - expect(subresource.current_resource.x).to eq 'loaded 2 (name=blah)' + expect(subresource.current_value.x).to eq 'loaded 2 (name=blah)' end it "load_current_value yields a copy of the child class" do - expect(subresource.current_resource).to be_kind_of(subresource_class) + expect(subresource.current_value).to be_kind_of(subresource_class) end end @@ -178,7 +178,7 @@ describe "Resource.load_current_value" do } it "the overridden load_current_value is used" do - current_resource = subresource.current_resource + current_resource = subresource.current_value expect(current_resource.x).to eq 'default 3' expect(current_resource.y).to eq 'loaded_y 2 (name=blah)' end @@ -196,7 +196,7 @@ describe "Resource.load_current_value" do } it "the original load_current_value is called as well as the child one" do - current_resource = subresource.current_resource + current_resource = subresource.current_value expect(current_resource.x).to eq 'loaded 3 (name=blah)' expect(current_resource.y).to eq 'loaded_y 4 (name=blah, x=loaded 3 (name=blah))' end |