summaryrefslogtreecommitdiff
path: root/spec/unit/facter/root_home_spec.rb
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2014-06-04 14:37:45 -0400
committerAshley Penney <ashley.penney@puppetlabs.com>2014-06-04 14:37:45 -0400
commitd65d2354a7458c3281386e7065bd1938d2c2adee (patch)
tree33ba6f310e0d9670335fabb67ecda630f1668467 /spec/unit/facter/root_home_spec.rb
parentf9f6e92dffa8364cfbbd92a6a65f4be4ef176d2c (diff)
downloadpuppet-stdlib-d65d2354a7458c3281386e7065bd1938d2c2adee.tar.gz
puppet-stdlib-d65d2354a7458c3281386e7065bd1938d2c2adee.tar.bz2
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/root_home_spec.rb')
-rwxr-xr-xspec/unit/facter/root_home_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/facter/root_home_spec.rb b/spec/unit/facter/root_home_spec.rb
index 73eb3ea..98fe141 100755
--- a/spec/unit/facter/root_home_spec.rb
+++ b/spec/unit/facter/root_home_spec.rb
@@ -9,7 +9,7 @@ describe Facter::Util::RootHome do
it "should return /" do
Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(root_ent)
- Facter::Util::RootHome.get_root_home.should == expected_root_home
+ expect(Facter::Util::RootHome.get_root_home).to eq(expected_root_home)
end
end
context "linux" do
@@ -18,7 +18,7 @@ describe Facter::Util::RootHome do
it "should return /root" do
Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(root_ent)
- Facter::Util::RootHome.get_root_home.should == expected_root_home
+ expect(Facter::Util::RootHome.get_root_home).to eq(expected_root_home)
end
end
context "windows" do
@@ -26,7 +26,7 @@ describe Facter::Util::RootHome do
Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(nil)
end
it "should be nil on windows" do
- Facter::Util::RootHome.get_root_home.should be_nil
+ expect(Facter::Util::RootHome.get_root_home).to be_nil
end
end
end
@@ -45,7 +45,7 @@ describe 'root_home', :type => :fact do
it "should return /var/root" do
Facter::Util::Resolution.stubs(:exec).with("dscacheutil -q user -a name root").returns(sample_dscacheutil)
- Facter.fact(:root_home).value.should == expected_root_home
+ expect(Facter.fact(:root_home).value).to eq(expected_root_home)
end
end