-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Stub has_attribute? to comply with rails 4.0.4 #956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for looking into this, can you find source material (ideally a rails commit) proving it's a necessary component for In the mean time you can stub this method yourself in spree to make it work without modifying |
|
Sure thing I'll look into it later today. As pointed above this is the rails commit make that change required rails/rails@eaf0d50 and this is the specific line calling a method not defined / stubbed by I'll open an issue / PR on the mock gem for rspec 3 too. Thanks! |
|
That commit doesn't mention a |
|
Ah yeah my bad, that's just the commit that started throwing errors. At that point rspec-rails would complain about a missing I was not sure whether to return true or false. Just took the |
|
@JonRowe here's the rails commit with Just tried but couldn't set up a test to reproduce the issue. I was basically trying to set up a spec where we assign children objects to its parent on a has_many relationship like we do here for example https://github.com/spree/spree/blob/v2.2.0/core/spec/models/spree/promotion_spec.rb#L60-L62 |
|
Well we'll definitely need a test, just rubber ducking but you did reverse this patch when trying to write a failing test right? ;) |
|
Thanks for bringing this up. I think we can probably define this as |
|
Thanks Andy! On Sunday, 23 March 2014, Andy Lindeman notifications@github.com wrote:
|
|
Would appreciate some 👀 over on #965 :) |
|
Done |
See rails/rails@eaf0d50
Hey guys sorry for the lack of specs here or if this doesn't make sense (will try to look into the specs). Let me know if this is not the way we should be going.
Noticed these kinds of errors while upgrading Spree to rails 4.0.4 and thought it might be handy to have this stub here too. You can find some more context here: spree/spree@2e8fee9#commitcomment-5693277
cheers