summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-08-17 12:05:02 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-08-17 12:05:02 -0700
commite756f15f1034757cce5123c7fa9c77ff6627e313 (patch)
treea75959d0916ebb75ecdc5db4a3a36137e2786d99 /spec/unit
parentef05ba4dbd75135c4b17e237bdfa7725f45c4581 (diff)
downloadohai-e756f15f1034757cce5123c7fa9c77ff6627e313.tar.gz
Style/StringLiterals fixes from rubocop 0.42.0
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/application_spec.rb2
-rw-r--r--spec/unit/plugins/darwin/hardware_system_profiler_output.rb6
-rw-r--r--spec/unit/plugins/linux/network_spec.rb10
-rw-r--r--spec/unit/plugins/linux/platform_spec.rb4
-rw-r--r--spec/unit/util/ip_helper_spec.rb4
5 files changed, 13 insertions, 13 deletions
diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb
index 0f45786e..e815063f 100644
--- a/spec/unit/application_spec.rb
+++ b/spec/unit/application_spec.rb
@@ -34,7 +34,7 @@ RSpec.describe "Ohai::Application" do
ARGV.replace(@original_argv)
end
- describe '#configure_ohai' do
+ describe "#configure_ohai" do
describe "loading configuration from a file" do
let(:config_file) { "/local/workstation/config" }
let(:config_loader) { instance_double("ChefConfig::WorkstationConfigLoader") }
diff --git a/spec/unit/plugins/darwin/hardware_system_profiler_output.rb b/spec/unit/plugins/darwin/hardware_system_profiler_output.rb
index 086ebec0..d56f2223 100644
--- a/spec/unit/plugins/darwin/hardware_system_profiler_output.rb
+++ b/spec/unit/plugins/darwin/hardware_system_profiler_output.rb
@@ -1,5 +1,5 @@
module HardwareSystemProfilerOutput
- Hardware = <<hardware_output
+ HARDWARE = <<hardware_output
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@@ -289,7 +289,7 @@ module HardwareSystemProfilerOutput
</plist>
hardware_output
- Storage = <<storage_output
+ STORAGE = <<storage_output
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@@ -600,7 +600,7 @@ hardware_output
</plist>
storage_output
- Power = <<power_output
+ POWER = <<power_output
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
diff --git a/spec/unit/plugins/linux/network_spec.rb b/spec/unit/plugins/linux/network_spec.rb
index e2037fc3..3134bb94 100644
--- a/spec/unit/plugins/linux/network_spec.rb
+++ b/spec/unit/plugins/linux/network_spec.rb
@@ -392,7 +392,7 @@ EOM
end
end
- describe '#interface_has_no_addresses_in_family?' do
+ describe "#interface_has_no_addresses_in_family?" do
context "when interface has no addresses" do
let(:iface) { {} }
@@ -418,7 +418,7 @@ EOM
end
end
- describe '#interface_have_address?' do
+ describe "#interface_have_address?" do
context "when interface has no addresses" do
let(:iface) { {} }
@@ -444,7 +444,7 @@ EOM
end
end
- describe '#interface_address_not_link_level?' do
+ describe "#interface_address_not_link_level?" do
context "when the address scope is link" do
let(:iface) { { addresses: { "1.2.3.4" => { scope: "Link" } } } }
@@ -462,7 +462,7 @@ EOM
end
end
- describe '#interface_valid_for_route?' do
+ describe "#interface_valid_for_route?" do
let(:iface) { double("iface") }
let(:address) { "1.2.3.4" }
let(:family) { "inet" }
@@ -508,7 +508,7 @@ EOM
end
end
- describe '#route_is_valid_default_route?' do
+ describe "#route_is_valid_default_route?" do
context "when the route destination is default" do
let(:route) { { destination: "default" } }
let(:default_route) { double("default_route") }
diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb
index fffa7d51..5bff78e4 100644
--- a/spec/unit/plugins/linux/platform_spec.rb
+++ b/spec/unit/plugins/linux/platform_spec.rb
@@ -699,7 +699,7 @@ CISCO_RELEASE
end
end
- describe '#read_os_release_info' do
+ describe "#read_os_release_info" do
let(:file_contents) { "COW=MOO\nDOG=\"BARK\"" }
it "returns nil if the file does not exist" do
allow(File).to receive(:exist?).with("/etc/test-release").and_return(false)
@@ -716,7 +716,7 @@ CISCO_RELEASE
end
end
- describe '#os_release_info' do
+ describe "#os_release_info" do
context "when CISCO_RELEASE_INFO is not populated" do
let(:release_info) { { "ID" => "os_id" } }
diff --git a/spec/unit/util/ip_helper_spec.rb b/spec/unit/util/ip_helper_spec.rb
index 766a9636..0532cbc9 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 "should call #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 "should return the inverse of #private_address?" do
expect(ip_helper.public_address?(address)).to equal !ip_helper.private_address?(address)
end
end