summaryrefslogtreecommitdiff
path: root/spec/unit/provider/ifconfig_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-01-29 14:17:47 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-01-29 14:17:47 -0800
commitb19b7d000887209f9d8dc1dc6aa468a0497a7391 (patch)
tree68d1eb6c136df20c2800f1dddb4e2c1ed5d75a42 /spec/unit/provider/ifconfig_spec.rb
parentb5c9c6afdfd83fe3f1bf4c991daffeff94b49750 (diff)
downloadchef-b19b7d000887209f9d8dc1dc6aa468a0497a7391.tar.gz
s/stub!/stub/g
fix deprecation warnings
Diffstat (limited to 'spec/unit/provider/ifconfig_spec.rb')
-rw-r--r--spec/unit/provider/ifconfig_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/provider/ifconfig_spec.rb b/spec/unit/provider/ifconfig_spec.rb
index f4fdc23353..80f623302f 100644
--- a/spec/unit/provider/ifconfig_spec.rb
+++ b/spec/unit/provider/ifconfig_spec.rb
@@ -57,8 +57,8 @@ describe Chef::Provider::Ifconfig do
describe Chef::Provider::Ifconfig, "action_add" do
it "should add an interface if it does not exist" do
- #@provider.stub!(:run_command).and_return(true)
- @provider.stub!(:load_current_resource)
+ #@provider.stub(:run_command).and_return(true)
+ @provider.stub(:load_current_resource)
@current_resource.inet_addr nil
command = "ifconfig eth0 10.0.0.1 netmask 255.255.254.0 metric 1 mtu 1500"
@provider.should_receive(:run_command).with(:command => command)
@@ -69,7 +69,7 @@ describe Chef::Provider::Ifconfig do
end
it "should not add an interface if it already exists" do
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
@provider.should_not_receive(:run_command)
@current_resource.inet_addr "10.0.0.1"
@provider.should_not_receive(:generate_config)
@@ -86,7 +86,7 @@ describe Chef::Provider::Ifconfig do
describe Chef::Provider::Ifconfig, "action_enable" do
it "should enable interface if does not exist" do
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
@current_resource.inet_addr nil
command = "ifconfig eth0 10.0.0.1 netmask 255.255.254.0 metric 1 mtu 1500"
@provider.should_receive(:run_command).with(:command => command)
@@ -97,7 +97,7 @@ describe Chef::Provider::Ifconfig do
end
it "should not enable interface if it already exists" do
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
@provider.should_not_receive(:run_command)
@current_resource.inet_addr "10.0.0.1"
@provider.should_not_receive(:generate_config)
@@ -110,7 +110,7 @@ describe Chef::Provider::Ifconfig do
describe Chef::Provider::Ifconfig, "action_delete" do
it "should delete interface if it exists" do
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
@current_resource.device "eth0"
command = "ifconfig #{@new_resource.device} down"
@provider.should_receive(:run_command).with(:command => command)
@@ -121,7 +121,7 @@ describe Chef::Provider::Ifconfig do
end
it "should not delete interface if it does not exist" do
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
@provider.should_not_receive(:run_command)
@provider.should_not_receive(:delete_config)
@@ -133,7 +133,7 @@ describe Chef::Provider::Ifconfig do
describe Chef::Provider::Ifconfig, "action_disable" do
it "should disable interface if it exists" do
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
@current_resource.device "eth0"
command = "ifconfig #{@new_resource.device} down"
@provider.should_receive(:run_command).with(:command => command)
@@ -144,7 +144,7 @@ describe Chef::Provider::Ifconfig do
end
it "should not delete interface if it does not exist" do
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
@provider.should_not_receive(:run_command)
@provider.should_not_receive(:delete_config)
@@ -156,7 +156,7 @@ describe Chef::Provider::Ifconfig do
describe Chef::Provider::Ifconfig, "action_delete" do
it "should delete interface of it exists" do
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
@current_resource.device "eth0"
command = "ifconfig #{@new_resource.device} down"
@provider.should_receive(:run_command).with(:command => command)
@@ -168,7 +168,7 @@ describe Chef::Provider::Ifconfig do
it "should not delete interface if it does not exist" do
# This is so that our fake values do not get overwritten
- @provider.stub!(:load_current_resource)
+ @provider.stub(:load_current_resource)
# This is so that nothing actually runs
@provider.should_not_receive(:run_command)
@provider.should_not_receive(:delete_config)