Panda & Tiger: Done. Eagle: confused.#19
Open
mjvezzani wants to merge 4 commits intoRubyoffRails:masterfrom
Open
Panda & Tiger: Done. Eagle: confused.#19mjvezzani wants to merge 4 commits intoRubyoffRails:masterfrom
mjvezzani wants to merge 4 commits intoRubyoffRails:masterfrom
Conversation
spec/vehicle_spec.rb
Outdated
Member
There was a problem hiding this comment.
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
describe Vehicle do
it "tracks the number of vehicles created" do
expect {
Motorcycle.new
} .to change{Vehicle.vehicle_count}.by(1)
end
endThen, to get this to pass, we add a method to Vehicle
def self.vehicle_count
@@vehicles_made
end
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:
The rest of your code looks excellent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not quite sure where to go with the eagle requirements to keep track of number of vehicles made. See failing test.