diff options
author | Bryan McLellan <btm@opscode.com> | 2014-06-10 12:31:23 -0400 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2014-06-10 12:31:23 -0400 |
commit | e87beb187104f1ab588668aeae50ec4bbd1c201a (patch) | |
tree | d612f11b5405c00efd3d84fb2879b2b1fa8d2e59 | |
parent | 3800ae10cc8adc9de1195f3cfc70d82679b4aa9b (diff) | |
download | chef-e87beb187104f1ab588668aeae50ec4bbd1c201a.tar.gz |
CHEF-5113: Fix apt package unit test regression on non-debian platforms
-rw-r--r-- | spec/unit/provider/package/apt_spec.rb | 1 | ||||
-rw-r--r-- | spec/unit/provider/user/useradd_spec.rb | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/provider/package/apt_spec.rb b/spec/unit/provider/package/apt_spec.rb index a72c09242f..e5a3e4c689 100644 --- a/spec/unit/provider/package/apt_spec.rb +++ b/spec/unit/provider/package/apt_spec.rb @@ -172,6 +172,7 @@ SHOWPKG_STDOUT it "raises an exception if a source is specified (CHEF-5113)" do @new_resource.source "pluto" @provider.define_resource_requirements + @provider.should_receive(:shell_out!).with("apt-cache policy irssi").and_return(@shell_out) expect { @provider.run_action(:install) }.to raise_error(Chef::Exceptions::Package) end end diff --git a/spec/unit/provider/user/useradd_spec.rb b/spec/unit/provider/user/useradd_spec.rb index 5862ee3716..681587ef4d 100644 --- a/spec/unit/provider/user/useradd_spec.rb +++ b/spec/unit/provider/user/useradd_spec.rb @@ -37,4 +37,11 @@ describe Chef::Provider::User::Useradd do } include_examples "a useradd-based user provider", supported_useradd_options + + describe "manage_user" do + it "should not run the command if universal_options is an empty array" do + provider.stub!(:universal_options).and_return([]) + expect(provider.manage_user).not_to receive(:compile_command) + end + end end |