summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/unit/config_spec.rb4
-rw-r--r--spec/unit/provider/mount_spec.rb8
-rw-r--r--spec/unit/provider/remote_file_spec.rb4
-rw-r--r--spec/unit/provider/service/systemd_service_spec.rb4
-rw-r--r--spec/unit/provider/service/upstart_service_spec.rb4
-rw-r--r--spec/unit/provider/service_spec.rb6
6 files changed, 15 insertions, 15 deletions
diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb
index 8c68e4985b..96e720dc3a 100644
--- a/spec/unit/config_spec.rb
+++ b/spec/unit/config_spec.rb
@@ -131,7 +131,7 @@ describe Chef::Config do
end
it "should not generate and store a chef server cookie id" do
- Chef::FileCache.should_not_receive(:store).with("chef_server_cookie_id", /\w{40}/).and_return(true)
+ Chef::FileCache.should_not_receive(:store).with("chef_server_cookie_id", /\w{40}/)
Chef::Config.manage_secret_key
end
end
@@ -167,7 +167,7 @@ describe Chef::Config do
describe "class method: openid_providers=" do
it "should not log an appropriate deprecation info message" do
- Chef::Log.should_not_receive(:info).with("DEPRECATION: openid_providers will be removed, please use authorized_openid_providers").and_return(true)
+ Chef::Log.should_not_receive(:info).with("DEPRECATION: openid_providers will be removed, please use authorized_openid_providers")
Chef::Config.openid_providers = %w{opscode.com junglist.gen.nz}
end
diff --git a/spec/unit/provider/mount_spec.rb b/spec/unit/provider/mount_spec.rb
index 921bde4cc9..ca69db3c4b 100644
--- a/spec/unit/provider/mount_spec.rb
+++ b/spec/unit/provider/mount_spec.rb
@@ -51,7 +51,7 @@ describe Chef::Provider::Mount do
it "should not mount the filesystem if it is mounted" do
@current_resource.stub!(:mounted).and_return(true)
- @provider.should_not_receive(:mount_fs).and_return(true)
+ @provider.should_not_receive(:mount_fs)
@provider.run_action(:mount)
@new_resource.should_not be_updated_by_last_action
end
@@ -68,7 +68,7 @@ describe Chef::Provider::Mount do
it "should not umount the filesystem if it is not mounted" do
@current_resource.stub!(:mounted).and_return(false)
- @provider.should_not_receive(:umount_fs).and_return(true)
+ @provider.should_not_receive(:umount_fs)
@provider.run_action(:umount)
@new_resource.should_not be_updated_by_last_action
end
@@ -115,7 +115,7 @@ describe Chef::Provider::Mount do
it "should not enable the mount if it is enabled" do
@current_resource.stub!(:enabled).and_return(true)
- @provider.should_not_receive(:enable_fs).with.and_return(true)
+ @provider.should_not_receive(:enable_fs)
@provider.run_action(:enable)
@new_resource.should_not be_updated_by_last_action
end
@@ -131,7 +131,7 @@ describe Chef::Provider::Mount do
it "should not disable the mount if it isn't enabled" do
@current_resource.stub!(:enabled).and_return(false)
- @provider.should_not_receive(:disable_fs).with.and_return(true)
+ @provider.should_not_receive(:disable_fs)
@provider.run_action(:disable)
@new_resource.should_not be_updated_by_last_action
end
diff --git a/spec/unit/provider/remote_file_spec.rb b/spec/unit/provider/remote_file_spec.rb
index 78d7e77121..50d1ad0f40 100644
--- a/spec/unit/provider/remote_file_spec.rb
+++ b/spec/unit/provider/remote_file_spec.rb
@@ -123,7 +123,7 @@ describe Chef::Provider::RemoteFile, "action_create" do
end
it "does not download the file" do
- @rest.should_not_receive(:fetch).with("http://opscode.com/seattle.txt").and_return(@tempfile)
+ @rest.should_not_receive(:fetch).with("http://opscode.com/seattle.txt")
@provider.run_action(:create)
end
@@ -140,7 +140,7 @@ describe Chef::Provider::RemoteFile, "action_create" do
end
it "should not download the file if the checksum is a partial match from the beginning" do
- @rest.should_not_receive(:fetch).with("http://opscode.com/seattle.txt").and_return(@tempfile)
+ @rest.should_not_receive(:fetch).with("http://opscode.com/seattle.txt")
@provider.run_action(:create)
end
diff --git a/spec/unit/provider/service/systemd_service_spec.rb b/spec/unit/provider/service/systemd_service_spec.rb
index dbdedecd40..bca28a2d92 100644
--- a/spec/unit/provider/service/systemd_service_spec.rb
+++ b/spec/unit/provider/service/systemd_service_spec.rb
@@ -135,7 +135,7 @@ describe Chef::Provider::Service::Systemd do
it "should not call '/bin/systemctl start service_name' if it is already running" do
@current_resource.stub!(:running).and_return(true)
- @provider.should_not_receive(:run_command_with_systems_locale).with({:command => "/bin/systemctl start #{@new_resource.service_name}"}).and_return(0)
+ @provider.should_not_receive(:run_command_with_systems_locale).with({:command => "/bin/systemctl start #{@new_resource.service_name}"})
@provider.start_service
end
@@ -180,7 +180,7 @@ describe Chef::Provider::Service::Systemd do
it "should not call '/bin/systemctl stop service_name' if it is already stopped" do
@current_resource.stub!(:running).and_return(false)
- @provider.should_not_receive(:run_command_with_systems_locale).with({:command => "/bin/systemctl stop #{@new_resource.service_name}"}).and_return(0)
+ @provider.should_not_receive(:run_command_with_systems_locale).with({:command => "/bin/systemctl stop #{@new_resource.service_name}"})
@provider.stop_service
end
end
diff --git a/spec/unit/provider/service/upstart_service_spec.rb b/spec/unit/provider/service/upstart_service_spec.rb
index 2fc49c7aa2..4604d1b697 100644
--- a/spec/unit/provider/service/upstart_service_spec.rb
+++ b/spec/unit/provider/service/upstart_service_spec.rb
@@ -247,7 +247,7 @@ describe Chef::Provider::Service::Upstart do
it "should not call '/sbin/start service_name' if it is already running" do
@current_resource.stub!(:running).and_return(true)
- @provider.should_not_receive(:run_command_with_systems_locale).with({:command => "/sbin/start #{@new_resource.service_name}"}).and_return(0)
+ @provider.should_not_receive(:run_command_with_systems_locale).with({:command => "/sbin/start #{@new_resource.service_name}"})
@provider.start_service()
end
@@ -307,7 +307,7 @@ describe Chef::Provider::Service::Upstart do
it "should not call '/sbin/stop service_name' if it is already stopped" do
@current_resource.stub!(:running).and_return(false)
- @provider.should_not_receive(:run_command_with_systems_locale).with({:command => "/sbin/stop #{@new_resource.service_name}"}).and_return(0)
+ @provider.should_not_receive(:run_command_with_systems_locale).with({:command => "/sbin/stop #{@new_resource.service_name}"})
@provider.stop_service()
end
end
diff --git a/spec/unit/provider/service_spec.rb b/spec/unit/provider/service_spec.rb
index 6b2b758f21..3719af56f2 100644
--- a/spec/unit/provider/service_spec.rb
+++ b/spec/unit/provider/service_spec.rb
@@ -60,7 +60,7 @@ describe Chef::Provider::Service do
it "should not disable the service if already disabled" do
@current_resource.stub!(:enabled).and_return(false)
- @provider.should_not_receive(:disable_service).and_return(true)
+ @provider.should_not_receive(:disable_service)
@provider.run_action(:disable)
@provider.new_resource.should_not be_updated
end
@@ -92,7 +92,7 @@ describe Chef::Provider::Service do
it "should not stop the service if it's already stopped" do
@current_resource.stub!(:running).and_return(false)
- @provider.should_not_receive(:stop_service).and_return(true)
+ @provider.should_not_receive(:stop_service)
@provider.run_action(:stop)
@provider.new_resource.should_not be_updated
end
@@ -137,7 +137,7 @@ describe Chef::Provider::Service do
it "should not reload the service if it's stopped" do
@current_resource.stub!(:running).and_return(false)
- @provider.should_not_receive(:reload_service).and_return(true)
+ @provider.should_not_receive(:reload_service)
@provider.run_action(:stop)
@provider.new_resource.should_not be_updated
end