diff options
Diffstat (limited to 'spec/unit/provider/package/openbsd_spec.rb')
-rw-r--r-- | spec/unit/provider/package/openbsd_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/provider/package/openbsd_spec.rb b/spec/unit/provider/package/openbsd_spec.rb index 01d6571f65..48e4b12a72 100644 --- a/spec/unit/provider/package/openbsd_spec.rb +++ b/spec/unit/provider/package/openbsd_spec.rb @@ -45,14 +45,14 @@ describe Chef::Provider::Package::Openbsd do context "when not already installed" do before do - allow(provider).to receive(:shell_out_compacted!).with("pkg_info", "-e", "#{name}->0", anything()).and_return(instance_double("shellout", stdout: "")) + allow(provider).to receive(:shell_out_compacted!).with("pkg_info", "-e", "#{name}->0", anything).and_return(instance_double("shellout", stdout: "")) end context "when there is a single candidate" do context "when source is not provided" do it "should run the installation command" do - expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-I", name, anything()).and_return( + expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-I", name, anything).and_return( instance_double("shellout", stdout: "#{name}-#{version}\n")) expect(provider).to receive(:shell_out_compacted!).with( "pkg_add", "-r", "#{name}-#{version}", @@ -69,7 +69,7 @@ describe Chef::Provider::Package::Openbsd do context "if no version is specified" do it "should raise an exception" do - expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-I", name, anything()).and_return( + expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-I", name, anything).and_return( instance_double("shellout", stdout: "#{name}-#{version}-#{flavor_a}\n#{name}-#{version}-#{flavor_b}\n")) expect { provider.run_action(:install) }.to raise_error(Chef::Exceptions::Package, /multiple matching candidates/) end @@ -83,8 +83,8 @@ describe Chef::Provider::Package::Openbsd do context "if no version is specified" do it "should run the installation command" do - expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-e", "#{package_name}->0", anything()).and_return(instance_double("shellout", stdout: "")) - expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-I", name, anything()).and_return( + expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-e", "#{package_name}->0", anything).and_return(instance_double("shellout", stdout: "")) + expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-I", name, anything).and_return( instance_double("shellout", stdout: "#{name}-#{version}-#{flavor}\n")) expect(provider).to receive(:shell_out_compacted!).with( "pkg_add", "-r", "#{name}-#{version}-#{flavor}", @@ -98,7 +98,7 @@ describe Chef::Provider::Package::Openbsd do context "if a version is specified" do it "should use the flavor from the version" do - expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-I", "#{name}-#{version}-#{flavor_b}", anything()).and_return( + expect(provider).to receive(:shell_out_compacted!).with("pkg_info", "-I", "#{name}-#{version}-#{flavor_b}", anything).and_return( instance_double("shellout", stdout: "#{name}-#{version}-#{flavor_a}\n")) new_resource.version("#{version}-#{flavor_b}") |