diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-10-24 18:12:50 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-10-24 18:12:50 -0700 |
commit | bd0b0a34e4dbb60fe61bbc8716df90e8f7c7d19a (patch) | |
tree | acc7a2d09b2cec8eed863218c0400cd15cd27854 /spec/unit/resource/log_spec.rb | |
parent | bdce1c5619fde7d277262df9336e06f73e4fc3f8 (diff) | |
download | chef-bd0b0a34e4dbb60fe61bbc8716df90e8f7c7d19a.tar.gz |
updating resources/providers unit tests to rpsec3
mechanically generated patch using transpec 2.3.7 gem
Diffstat (limited to 'spec/unit/resource/log_spec.rb')
-rw-r--r-- | spec/unit/resource/log_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/unit/resource/log_spec.rb b/spec/unit/resource/log_spec.rb index c0201e57f3..b2af194238 100644 --- a/spec/unit/resource/log_spec.rb +++ b/spec/unit/resource/log_spec.rb @@ -27,29 +27,29 @@ describe Chef::Resource::Log do end it "should create a new Chef::Resource::Log" do - @resource.should be_a_kind_of(Chef::Resource) - @resource.should be_a_kind_of(Chef::Resource::Log) + expect(@resource).to be_a_kind_of(Chef::Resource) + expect(@resource).to be_a_kind_of(Chef::Resource::Log) end it "supports the :write actions" do - @resource.allowed_actions.should include(:write) + expect(@resource.allowed_actions).to include(:write) end it "should have a name of log" do - @resource.resource_name.should == :log + expect(@resource.resource_name).to eq(:log) end it "should allow you to set a log string" do - @resource.name.should == @log_str + expect(@resource.name).to eq(@log_str) end it "should set the message to the first argument to new" do - @resource.message.should == @log_str + expect(@resource.message).to eq(@log_str) end it "should accept a string for the log message" do @resource.message "this is different" - @resource.message.should == "this is different" + expect(@resource.message).to eq("this is different") end it "should accept a vaild level option" do @@ -58,7 +58,7 @@ describe Chef::Resource::Log do @resource.level :warn @resource.level :error @resource.level :fatal - lambda { @resource.level :unsupported }.should raise_error(ArgumentError) + expect { @resource.level :unsupported }.to raise_error(ArgumentError) end describe "when the identity is defined" do @@ -67,7 +67,7 @@ describe Chef::Resource::Log do end it "returns the log string as its identity" do - @resource.identity.should == "ery day I'm loggin-in" + expect(@resource.identity).to eq("ery day I'm loggin-in") end end end |