Improve naming in Remote#execute spec

This commit is contained in:
Thibault Jouan 2013-08-06 20:45:42 +00:00
parent 22ae12185d
commit ef96a2db82

View File

@ -30,13 +30,13 @@ module Producer::Core
end end
describe '#execute', :ssh do describe '#execute', :ssh do
let(:args) { 'some remote command' } let(:arguments) { 'some remote command' }
let(:command) { "echo #{args}" } let(:command) { "echo #{arguments}" }
it 'executes the given command in a new channel' do it 'executes the given command in a new channel' do
story_with_new_channel do |ch| story_with_new_channel do |ch|
ch.sends_exec command ch.sends_exec command
ch.gets_data args ch.gets_data arguments
end end
remote.execute command remote.execute command
expect(story_completed?).to be expect(story_completed?).to be
@ -45,9 +45,9 @@ module Producer::Core
it 'returns the output' do it 'returns the output' do
story_with_new_channel do |ch| story_with_new_channel do |ch|
ch.sends_exec command ch.sends_exec command
ch.gets_data args ch.gets_data arguments
end end
expect(remote.execute(command)).to eq args expect(remote.execute(command)).to eq arguments
end end
end end
end end