Skip to content

Commit

Permalink
add x attribute to MarRover class
Browse files Browse the repository at this point in the history
  • Loading branch information
Awhkrd committed Sep 14, 2023
1 parent 1eb1f2c commit ed5b308
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/mars_rover_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
RSpec.describe "Mars Rover" do
class MarsRover
attr :x

def initialize(x)
@x = x
end
end
it 'has an initial starting point (x, y)'

Expand All @@ -9,8 +13,7 @@ class MarsRover
describe '#initialize' do
context 'with valid inputs' do
it 'sets the x correctly' do
pending('TO DO')
mars_rover = MarsRover.new
mars_rover = MarsRover.new(x=0)
expect(mars_rover.x).to eq(0)
end
it 'sets the y correctly'
Expand Down

0 comments on commit ed5b308

Please sign in to comment.