spec/chake/backend/ssh_spec.rb in chake-0.4 vs spec/chake/backend/ssh_spec.rb in chake-0.4.1

- old
+ new

@@ -8,6 +8,17 @@ it('runs commands with ssh') { expect(backend.command_runner).to eq(['ssh', 'myuser@myhost']) } it('rsyncs over ssh') { expect(backend.rsync_dest).to eq('myuser@myhost:/srv/chef/') } + it 'uses no remote username if none was passed' do + node = Chake::Node.new('theserver') + expect(node.username).to eq(Etc.getpwuid.name) + expect(node.remote_username).to be_nil + end + + it 'uses username is passwd' do + expect(node.username).to eq('myuser') + expect(node.remote_username).to eq('myuser') + end + end