summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorScott Bonds <scott@ggr.com>2014-10-27 17:18:42 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-01-25 10:43:21 -0800
commit22e129071cf96e4e75a8645697bb2ffa91e871a9 (patch)
treea55a6f2c020e9e3f9c5da0a0896b02efbac801cc /spec
parent00daee77a98b1164d626158d58b9328322bd2c3c (diff)
downloadchef-22e129071cf96e4e75a8645697bb2ffa91e871a9.tar.gz
update tests to match changed file operations order
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/provider/service/openbsd_service_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/unit/provider/service/openbsd_service_spec.rb b/spec/unit/provider/service/openbsd_service_spec.rb
index c2c24c984c..e76ab8afea 100644
--- a/spec/unit/provider/service/openbsd_service_spec.rb
+++ b/spec/unit/provider/service/openbsd_service_spec.rb
@@ -50,8 +50,8 @@ describe Chef::Provider::Service::Openbsd do
let(:provider) do
events = Chef::EventDispatch::Dispatcher.new
run_context = Chef::RunContext.new(node, {}, events)
- expect(::File).to receive(:read).with('/etc/rc.conf').and_return('')
- expect(::File).to receive(:read).with('/etc/rc.conf.local').and_return('')
+ allow(::File).to receive(:read).with('/etc/rc.conf').and_return('')
+ allow(::File).to receive(:read).with('/etc/rc.conf.local').and_return('')
provider = Chef::Provider::Service::Openbsd.new(new_resource,run_context)
provider.action = :start
provider
@@ -467,6 +467,7 @@ PS_SAMPLE
describe Chef::Provider::Service::Openbsd, "enable_service" do
before do
provider.current_resource = current_resource
+ allow(FileUtils).to receive(:touch).with('/etc/rc.conf.local')
end
context "is builtin and disabled by default" do
before do
@@ -548,6 +549,7 @@ PS_SAMPLE
describe Chef::Provider::Service::Openbsd, "disable_service" do
before do
provider.current_resource = current_resource
+ allow(FileUtils).to receive(:touch).with('/etc/rc.conf.local')
end
context "is builtin and disabled by default" do
before do