diff options
author | Ashley Penney <ashley.penney@puppetlabs.com> | 2014-06-04 14:37:45 -0400 |
---|---|---|
committer | Ashley Penney <ashley.penney@puppetlabs.com> | 2014-06-04 14:37:45 -0400 |
commit | d65d2354a7458c3281386e7065bd1938d2c2adee (patch) | |
tree | 33ba6f310e0d9670335fabb67ecda630f1668467 /spec/unit/facter/pe_version_spec.rb | |
parent | f9f6e92dffa8364cfbbd92a6a65f4be4ef176d2c (diff) |
Convert specs to RSpec 2.99.0 syntax with Transpec
This conversion is done by Transpec 2.2.1 with the following command:
transpec spec/unit
* 53 conversions
from: obj.should
to: expect(obj).to
* 19 conversions
from: == expected
to: eq(expected)
* 5 conversions
from: lambda { }.should
to: expect { }.to
* 2 conversions
from: be_true
to: be_truthy
For more details: https://github.com/yujinakayama/transpec#supported-conversions
Diffstat (limited to 'spec/unit/facter/pe_version_spec.rb')
-rwxr-xr-x | spec/unit/facter/pe_version_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/facter/pe_version_spec.rb b/spec/unit/facter/pe_version_spec.rb index 931c6d4..4d0349e 100755 --- a/spec/unit/facter/pe_version_spec.rb +++ b/spec/unit/facter/pe_version_spec.rb @@ -26,23 +26,23 @@ describe "PE Version specs" do (major,minor,patch) = version.split(".") it "Should return true" do - Facter.fact(:is_pe).value.should == true + expect(Facter.fact(:is_pe).value).to eq(true) end it "Should have a version of #{version}" do - Facter.fact(:pe_version).value.should == version + expect(Facter.fact(:pe_version).value).to eq(version) end it "Should have a major version of #{major}" do - Facter.fact(:pe_major_version).value.should == major + expect(Facter.fact(:pe_major_version).value).to eq(major) end it "Should have a minor version of #{minor}" do - Facter.fact(:pe_minor_version).value.should == minor + expect(Facter.fact(:pe_minor_version).value).to eq(minor) end it "Should have a patch version of #{patch}" do - Facter.fact(:pe_patch_version).value.should == patch + expect(Facter.fact(:pe_patch_version).value).to eq(patch) end end end @@ -54,23 +54,23 @@ describe "PE Version specs" do end it "is_pe is false" do - Facter.fact(:is_pe).value.should == false + expect(Facter.fact(:is_pe).value).to eq(false) end it "pe_version is nil" do - Facter.fact(:pe_version).value.should be_nil + expect(Facter.fact(:pe_version).value).to be_nil end it "pe_major_version is nil" do - Facter.fact(:pe_major_version).value.should be_nil + expect(Facter.fact(:pe_major_version).value).to be_nil end it "pe_minor_version is nil" do - Facter.fact(:pe_minor_version).value.should be_nil + expect(Facter.fact(:pe_minor_version).value).to be_nil end it "Should have a patch version" do - Facter.fact(:pe_patch_version).value.should be_nil + expect(Facter.fact(:pe_patch_version).value).to be_nil end end end |