summaryrefslogtreecommitdiff
path: root/spec/functional/knife
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-01-16 15:29:03 -0800
committerdanielsdeleo <dan@opscode.com>2013-01-16 15:29:03 -0800
commit6705514c81550024fe37f62c71d85f101637dedd (patch)
tree600794cf452894d4ceb93c1392fdee31852d7775 /spec/functional/knife
parentb37e869a207f07c93b7c62d27f6ffb6de2805afe (diff)
downloadchef-6705514c81550024fe37f62c71d85f101637dedd.tar.gz
fix knife functional tests
Diffstat (limited to 'spec/functional/knife')
-rw-r--r--spec/functional/knife/ssh_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/functional/knife/ssh_spec.rb b/spec/functional/knife/ssh_spec.rb
index 19e63dd47a..53012ce56d 100644
--- a/spec/functional/knife/ssh_spec.rb
+++ b/spec/functional/knife/ssh_spec.rb
@@ -140,7 +140,7 @@ describe Chef::Knife::Ssh do
it "uses the default" do
@knife.run
- @knife.config[:ssh_user].should == nil
+ @knife.config[:ssh_user].should == "root"
end
end
end
@@ -194,6 +194,10 @@ describe Chef::Knife::Ssh do
def setup_knife(params=[])
@knife = Chef::Knife::Ssh.new(params)
+ # We explicitly avoid running #configure_chef, which would read a knife.rb
+ # if available, but #merge_configs (which is called by #configure_chef) is
+ # necessary to have default options merged in.
+ @knife.merge_configs
@knife.stub!(:ssh_command).and_return { 0 }
@api = TinyServer::API.instance
@api.clear