summaryrefslogtreecommitdiff
path: root/spec/unit/util
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2019-08-16 13:15:22 -0700
committerTim Smith <tsmith84@gmail.com>2019-08-16 13:15:22 -0700
commit54b3cc831750805f19f838d60dea25e23dfa2e8c (patch)
tree81f539fca05ca2d0ed0761011913cd852b46d450 /spec/unit/util
parent038fd847c6d75dfaf6e60b67de185732aa245cc3 (diff)
downloadohai-54b3cc831750805f19f838d60dea25e23dfa2e8c.tar.gz
rspec updates from rubocop-rspecrspec
Autocorrects for a few different things that rubocop-rspec identified. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/util')
-rw-r--r--spec/unit/util/file_helper_spec.rb2
-rw-r--r--spec/unit/util/ip_helper_spec.rb12
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/util/file_helper_spec.rb b/spec/unit/util/file_helper_spec.rb
index 88caeb5f..8fc542f0 100644
--- a/spec/unit/util/file_helper_spec.rb
+++ b/spec/unit/util/file_helper_spec.rb
@@ -26,7 +26,7 @@ end
describe "Ohai::Util::FileHelper" do
let(:file_helper) { FileHelperMock.new }
- before(:each) do
+ before do
allow(file_helper).to receive(:name).and_return("Fakeclass")
logger = instance_double("Mixlib::Log::Child", trace: nil, debug: nil, warn: nil)
allow(file_helper).to receive(:logger).and_return(logger)
diff --git a/spec/unit/util/ip_helper_spec.rb b/spec/unit/util/ip_helper_spec.rb
index 0532cbc9..ec9b37ba 100644
--- a/spec/unit/util/ip_helper_spec.rb
+++ b/spec/unit/util/ip_helper_spec.rb
@@ -78,12 +78,12 @@ describe "Ohai::Util::IpHelper" do
allow(ip_helper).to receive(:private_address?)
end
- it "should call #private_address?" do
+ it "calls #private_address?" do
expect(ip_helper).to receive(:private_address?)
ip_helper.public_address?(address)
end
- it "should return the inverse of #private_address?" do
+ it "returns the inverse of #private_address?" do
expect(ip_helper.public_address?(address)).to equal !ip_helper.private_address?(address)
end
end
@@ -93,7 +93,7 @@ describe "Ohai::Util::IpHelper" do
context "that is a loopback address" do
let(:address) { "127.0.0.1" }
- it "should identify the address as a loopback address" do
+ it "identifies the address as a loopback address" do
expect(ip_helper.loopback?(address)).to be_truthy
end
end
@@ -101,7 +101,7 @@ describe "Ohai::Util::IpHelper" do
context "that is not a loopback address" do
let(:address) { "1.2.3.4" }
- it "should not identify the address as a loopback address" do
+ it "does not identify the address as a loopback address" do
expect(ip_helper.loopback?(address)).to be_falsey
end
end
@@ -111,7 +111,7 @@ describe "Ohai::Util::IpHelper" do
context "that is a loopback address" do
let(:address) { "0:0:0:0:0:0:0:1" }
- it "should identify the address as a loopback address" do
+ it "identifies the address as a loopback address" do
expect(ip_helper.loopback?(address)).to be_truthy
end
end
@@ -119,7 +119,7 @@ describe "Ohai::Util::IpHelper" do
context "that is not a loopback address" do
let(:address) { "2400:6180:0000:00D0:0000:0000:0009:7001" }
- it "should not identify the address as a loopback address" do
+ it "does not identify the address as a loopback address" do
expect(ip_helper.loopback?(address)).to be_falsey
end
end