Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
- Loading branch information
Showing
6 changed files
with
66 additions
and
90 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
1129a24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure about this, but I think this commit causes the default generated rspec controller specs to fail.
Doing a “script/generate rspec_scaffold Bike name:string sku:string” generates a set of default controller specs like this:
This spec fails with an “ActionView::TemplateError: Mock ‘Bike_1017’ received unexpected message :name with (no args)” coming from the view, when it attempts to display
@bike.name
.Updating the spec to expect the fields to be called (e.g.,
mock_bike.should_receive(:name)
) does allow the spec to pass, but this is no longer an isolated controller test.I ran git bisect on edge rails, and the default specs start to fail as of this commit. I’m still new to all of this, so I don’t know why this commit breaks rspec, or if it should be considered a problem with rails or with rspec, but it does seem to be consistently reproducible.
Am I crazy? :)
-John
1129a24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like an rspec issue to me, raise it on their list and suggest they get in contact with us with any questions.
1129a24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do, thanks :)
-John