summaryrefslogtreecommitdiff
path: root/spec/functional/resource/ifconfig_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functional/resource/ifconfig_spec.rb')
-rw-r--r--spec/functional/resource/ifconfig_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/functional/resource/ifconfig_spec.rb b/spec/functional/resource/ifconfig_spec.rb
index 4733b05f35..6b40fbc2e2 100644
--- a/spec/functional/resource/ifconfig_spec.rb
+++ b/spec/functional/resource/ifconfig_spec.rb
@@ -16,11 +16,11 @@
# limitations under the License.
#
-require 'functional/resource/base'
-require 'chef/mixin/shell_out'
+require "functional/resource/base"
+require "chef/mixin/shell_out"
# run this test only for following platforms.
-include_flag = !(['ubuntu', 'centos', 'aix'].include?(ohai[:platform]))
+include_flag = !(["ubuntu", "centos", "aix"].include?(ohai[:platform]))
describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, :external => include_flag do
# This test does not work in travis because there is no eth0
@@ -28,7 +28,7 @@ describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, :external => in
include Chef::Mixin::ShellOut
let(:new_resource) do
- new_resource = Chef::Resource::Ifconfig.new('10.10.0.1', run_context)
+ new_resource = Chef::Resource::Ifconfig.new("10.10.0.1", run_context)
new_resource
end
@@ -45,9 +45,9 @@ describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, :external => in
# use loopback interface for tests
case ohai[:platform]
when "aix"
- 'lo0'
+ "lo0"
else
- 'lo'
+ "lo"
end
end
@@ -55,9 +55,9 @@ describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, :external => in
def en0_interface_for_test
case ohai[:platform]
when "aix"
- 'en0'
+ "en0"
else
- 'eth0'
+ "eth0"
end
end
@@ -107,14 +107,14 @@ describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, :external => in
# Actual tests
describe "#load_current_resource" do
- it 'should load given interface' do
+ it "should load given interface" do
new_resource.device lo_interface_for_test
expect(current_resource.device).to eql(lo_interface_for_test)
expect(current_resource.inet_addr).to match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)
end
end
- exclude_test = ohai[:platform] != 'ubuntu'
+ exclude_test = ohai[:platform] != "ubuntu"
describe "#action_add", :external => exclude_test do
after do
new_resource.run_action(:delete)