Skip to content

Commit

Permalink
Added a test from the list: we can move to the top edge of a planet.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalvarambhia committed Oct 25, 2023
1 parent 148d503 commit 6fc8367
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spec/operating_mars_rover_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,15 @@
expect(mars_rover).to be_located_at(right_hand_edge)
end

it 'can move to the top edge of the planet'
it 'can move to the top edge of the planet' do
mars_rover = MarsRover.new(map: Map.new, starting_position: Coordinates.new(x: 0, y: 9), direction: 'N')

mars_rover.execute(['f'])

top_edge = Coordinates.new(x: 0, y: 10)
expect(mars_rover).to be_located_at(top_edge)
end

it 'can move from the top edge of the planet and reappear at the bottom edge'
it 'can move to the bottom edge of the planet'
it 'can move from the bottom edge of the planet and reappear at the top edge'
Expand Down

0 comments on commit 6fc8367

Please sign in to comment.