summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorXabier de Zuazo <xabier@onddo.com>2013-02-10 18:26:23 +0100
committerBryan McLellan <btm@opscode.com>2013-06-19 14:09:57 -0700
commit182532e7ef9f5eab1e721f6c3fe7f62af7e95091 (patch)
tree5ff39299d1ad5a99d5e6626ec50a0af8dfb2c965 /spec
parente5ce37aaeff607cf83ecf3d183a901570a28a031 (diff)
downloadchef-182532e7ef9f5eab1e721f6c3fe7f62af7e95091.tar.gz
[CHEF-3029] Provider::Ifconfig::Redhat tests little clean up
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/provider/ifconfig/redhat_spec.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/unit/provider/ifconfig/redhat_spec.rb b/spec/unit/provider/ifconfig/redhat_spec.rb
index dd49257603..8e18fcd71e 100644
--- a/spec/unit/provider/ifconfig/redhat_spec.rb
+++ b/spec/unit/provider/ifconfig/redhat_spec.rb
@@ -40,11 +40,10 @@ describe Chef::Provider::Ifconfig::Redhat do
end
- describe Chef::Provider::Ifconfig::Redhat, "generate_config for action_add" do
+ describe "generate_config for action_add" do
it "should write network-script for centos" do
@provider.stub!(:load_current_resource)
- @node.automatic_attrs[:platform] = "centos"
@provider.stub!(:run_command)
config_filename = "/etc/sysconfig/network-scripts/ifcfg-#{@new_resource.device}"
config_file = StringIO.new
@@ -57,11 +56,10 @@ describe Chef::Provider::Ifconfig::Redhat do
end
end
- describe Chef::Provider::Ifconfig::Redhat, "delete_config for action_delete" do
+ describe "delete_config for action_delete" do
it "should delete network-script if it exists for centos" do
- @node.automatic_attrs[:platform] = "centos"
- @current_resource.device "eth0"
+ @current_resource.device @new_resource.device
@provider.stub!(:load_current_resource)
@provider.stub!(:run_command)
config_filename = "/etc/sysconfig/network-scripts/ifcfg-#{@new_resource.device}"