Skip to content

Panda & Tiger: Done. Eagle: confused. - #19

Open
mjvezzani wants to merge 4 commits into
RubyoffRails:masterfrom
mjvezzani:master
Open

Panda & Tiger: Done. Eagle: confused.#19
mjvezzani wants to merge 4 commits into
RubyoffRails:masterfrom
mjvezzani:master

Conversation

@mjvezzani

Copy link
Copy Markdown

Not quite sure where to go with the eagle requirements to keep track of number of vehicles made. See failing test.

Comment threadspec/vehicle_spec.rb Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's start by getting the correct test.

You have added a test that checks a global variable @@vehicles_made --- not the Vehicle's class variable @@vehicles_made

So, our test should reference that. In additional, the "should change" requires a bit of a different syntax

describeVehicledoit"tracks the number of vehicles created"doexpect{Motorcycle.new}.tochange{Vehicle.vehicle_count}.by(1)endend

Then, to get this to pass, we add a method to Vehicle

defself.vehicle_count@@vehicles_madeend

@jwo

jwo commented Jan 28, 2014

Copy link
Copy Markdown
Member

OK, let me know if that makes sense or not... Also, you'll probably need to rethink something (minor) to accomplish the last task in eagle:

Create a class method that let's you filter the vehicles to only blue honda accords (using our enumerable filters)

The rest of your code looks excellent

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mjvezzani@jwo