summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Danna <steve@opscode.com>2013-02-06 22:12:10 -0800
committerSteven Danna <steve@opscode.com>2013-02-06 23:09:32 -0800
commitcd2a5e8386469042cc114aacc3ec1d1f87e6338c (patch)
treede344e2560de485b094fc3e1992df60c4cbe12d6
parent8f723df36c3c3fb39778862facfc112acac570ef (diff)
downloadchef-ssd/fix-user-create-test.tar.gz
Fix test on windows by pre-expanding path.ssd/fix-user-create-test
-rw-r--r--spec/unit/knife/user_create_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/unit/knife/user_create_spec.rb b/spec/unit/knife/user_create_spec.rb
index 5bc9738313..f79c6b0cab 100644
--- a/spec/unit/knife/user_create_spec.rb
+++ b/spec/unit/knife/user_create_spec.rb
@@ -65,8 +65,9 @@ describe Chef::Knife::UserCreate do
end
it "sets the public key if given" do
- @knife.config[:user_key] = "/a/filename"
- File.stub(:read).with("/a/filename").and_return("a_key")
+ file_name = File.expand_path("/a/filename")
+ @knife.config[:user_key] = file_name
+ File.stub(:read).with(file_name).and_return("a_key")
@user.should_receive(:public_key).with("a_key")
@knife.run
end