summaryrefslogtreecommitdiff
path: root/spec/unit/run_lock_spec.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-09-16 16:43:30 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-09-16 16:43:30 -0700
commitdc1dd7f5ec1cd791b08ff03d2f9a4e955e119d4a (patch)
tree2c1c7237d1e7ef21b7719c5a9471ddbca94f49ae /spec/unit/run_lock_spec.rb
parent8fa661058877d5b465f4969e8fef9475af8f96a8 (diff)
downloadchef-dc1dd7f5ec1cd791b08ff03d2f9a4e955e119d4a.tar.gz
Use Chef::Config defaults for lockfile default
Diffstat (limited to 'spec/unit/run_lock_spec.rb')
-rw-r--r--spec/unit/run_lock_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/unit/run_lock_spec.rb b/spec/unit/run_lock_spec.rb
index 4e62b110b9..e054c4899c 100644
--- a/spec/unit/run_lock_spec.rb
+++ b/spec/unit/run_lock_spec.rb
@@ -22,12 +22,13 @@ describe Chef::RunLock do
describe "when first created" do
it "locates the lockfile in the file cache path by default" do
- run_lock = Chef::RunLock.new(:file_cache_path => "/var/chef/cache", :lockfile => nil)
+ run_lock = Chef::RunLock.new(Chef::Config.lockfile)
run_lock.runlock_file.should == "/var/chef/cache/chef-client-running.pid"
end
it "locates the lockfile in the user-configured path when set" do
- run_lock = Chef::RunLock.new(:file_cache_path => "/var/chef/cache", :lockfile => "/tmp/chef-client-running.pid")
+ Chef::Config.lockfile = "/tmp/chef-client-running.pid"
+ run_lock = Chef::RunLock.new(Chef::Config.lockfile)
run_lock.runlock_file.should == "/tmp/chef-client-running.pid"
end
end