Skip to content

Commit

Permalink
* Refactor tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledestin committed Apr 3, 2014
1 parent a90e7a3 commit b19486d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/string_driver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
}
end

it "#execute_command 'REPORT' returns value returned by robot" do
allow(@robot).to receive(:report) { 'result' }
expect(@driver.execute_command 'REPORT').not_to eq nil
end

context 'PLACE command requires 3 arguments to be passed to robot,' do
it 'is passed to robot when given 3 arguments' do
allow(@robot).to receive(:place)
Expand Down Expand Up @@ -75,6 +70,11 @@
end

context "#execute_command 'REPORT'" do
it 'returns string returned by robot' do
allow(@robot).to receive(:report) { 'result' }
expect(@driver.execute_command 'REPORT').to eq 'result'
end

it 'converts non-nil returned value of robot#report to a string' do
allow(@robot).to receive(:report) { 42 }
expect(@driver.execute_command 'REPORT').to eq '42'
Expand Down

0 comments on commit b19486d

Please sign in to comment.