diff options
author | Claire McQuin <claire@getchef.com> | 2014-10-29 15:14:22 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-10-29 15:59:04 -0700 |
commit | 5fed7a65a2f024d964ecf2de1bcf2911cf8a600c (patch) | |
tree | 14cc6968e4fe4fd2485c0211088b25c645a80a4b /spec/unit/provider/env_spec.rb | |
parent | b92c309b0f1aa0837f76ab89d6c81c36076ceca9 (diff) | |
download | chef-5fed7a65a2f024d964ecf2de1bcf2911cf8a600c.tar.gz |
Update to RSpec 3.
Diffstat (limited to 'spec/unit/provider/env_spec.rb')
-rw-r--r-- | spec/unit/provider/env_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/unit/provider/env_spec.rb b/spec/unit/provider/env_spec.rb index 22fed4b7ac..19233dfba9 100644 --- a/spec/unit/provider/env_spec.rb +++ b/spec/unit/provider/env_spec.rb @@ -30,7 +30,7 @@ describe Chef::Provider::Env do end it "assumes the key_name exists by default" do - expect(@provider.key_exists).to be_true + expect(@provider.key_exists).to be_truthy end describe "when loading the current status" do @@ -55,13 +55,13 @@ describe Chef::Provider::Env do it "should check if the key_name exists" do expect(@provider).to receive(:env_key_exists).with("FOO").and_return(true) @provider.load_current_resource - expect(@provider.key_exists).to be_true + expect(@provider.key_exists).to be_truthy end it "should flip the value of exists if the key does not exist" do expect(@provider).to receive(:env_key_exists).with("FOO").and_return(false) @provider.load_current_resource - expect(@provider.key_exists).to be_false + expect(@provider.key_exists).to be_falsey end it "should return the current resource" do @@ -230,25 +230,25 @@ describe Chef::Provider::Env do end it "should return false if the values are equal" do - expect(@provider.requires_modify_or_create?).to be_false + expect(@provider.requires_modify_or_create?).to be_falsey end it "should return true if the values not are equal" do @new_resource.value("C:/elsewhere") - expect(@provider.requires_modify_or_create?).to be_true + expect(@provider.requires_modify_or_create?).to be_truthy end it "should return false if the current value contains the element" do @new_resource.delim(";") @current_resource.value("C:/bar;C:/foo;C:/baz") - expect(@provider.requires_modify_or_create?).to be_false + expect(@provider.requires_modify_or_create?).to be_falsey end it "should return true if the current value does not contain the element" do @new_resource.delim(";") @current_resource.value("C:/biz;C:/foo/bin;C:/baz") - expect(@provider.requires_modify_or_create?).to be_true + expect(@provider.requires_modify_or_create?).to be_truthy end context "when new_resource's value contains the delimiter" do @@ -256,14 +256,14 @@ describe Chef::Provider::Env do @new_resource.value("C:/biz;C:/baz") @new_resource.delim(";") @current_resource.value("C:/biz;C:/foo/bin;C:/baz") - expect(@provider.requires_modify_or_create?).to be_false + expect(@provider.requires_modify_or_create?).to be_falsey end it "should return true if any of the new values are not contained" do @new_resource.value("C:/biz;C:/baz;C:/bin") @new_resource.delim(";") @current_resource.value("C:/biz;C:/foo/bin;C:/baz") - expect(@provider.requires_modify_or_create?).to be_true + expect(@provider.requires_modify_or_create?).to be_truthy end end end |