diff options
Diffstat (limited to 'spec/unit/resource/ifconfig_spec.rb')
-rw-r--r-- | spec/unit/resource/ifconfig_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/unit/resource/ifconfig_spec.rb b/spec/unit/resource/ifconfig_spec.rb index bdacaa35a4..e3e1f6daa2 100644 --- a/spec/unit/resource/ifconfig_spec.rb +++ b/spec/unit/resource/ifconfig_spec.rb @@ -47,8 +47,10 @@ describe Chef::Resource::Ifconfig do end end - shared_examples "being a platform using the default ifconfig provider" do |platform, version| + shared_examples "being a platform based on an old Debian" do |platform, version| before do + @node.automatic_attrs[:os] = 'linux' + @node.automatic_attrs[:platform_family] = 'debian' @node.automatic_attrs[:platform] = platform @node.automatic_attrs[:platform_version] = version end @@ -60,6 +62,8 @@ describe Chef::Resource::Ifconfig do shared_examples "being a platform based on RedHat" do |platform, version| before do + @node.automatic_attrs[:os] = 'linux' + @node.automatic_attrs[:platform_family] = 'rhel' @node.automatic_attrs[:platform] = platform @node.automatic_attrs[:platform_version] = version end @@ -71,6 +75,8 @@ describe Chef::Resource::Ifconfig do shared_examples "being a platform based on a recent Debian" do |platform, version| before do + @node.automatic_attrs[:os] = 'linux' + @node.automatic_attrs[:platform_family] = 'debian' @node.automatic_attrs[:platform] = platform @node.automatic_attrs[:platform_version] = version end @@ -85,7 +91,7 @@ describe Chef::Resource::Ifconfig do end describe "when it is an old Debian platform" do - it_should_behave_like "being a platform using the default ifconfig provider", "debian", "6.0" + it_should_behave_like "being a platform based on an old Debian", "debian", "6.0" end describe "when it is a new Debian platform" do @@ -93,7 +99,7 @@ describe Chef::Resource::Ifconfig do end describe "when it is an old Ubuntu platform" do - it_should_behave_like "being a platform using the default ifconfig provider", "ubuntu", "11.04" + it_should_behave_like "being a platform based on an old Debian", "ubuntu", "11.04" end describe "when it is a new Ubuntu platform" do |