-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix Undefined Method cache
on rails 4.2.5.1 / 4.1.14.1
#1533
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
As of rails/rails@0c5c32aa7cea5ee1ea60 not all calls funnel through find_all - calls to render file: '...' call find_all_anywhere
The related change on Rails 4.1 (rails/rails@be543e8) and 4.2 (rails/rails@0c5c32a). This change does indeed seem to make my spec suite run again. |
👍 This fixes ny test suite. Although perhaps we want to be calling |
I think the 1.8.7 failures are down to the rails 3-2 branch having broken 1.8.7 support. Not sure about the nokogiri install failures |
As far as I can see, find_all_anywhere isn't a method on PathSet - only on Resolver |
Hi @fcheung can you also provide a spec for this? Let me know if you need some help with that. |
…hod in Rails. Rails 4.1.14.1 introducted a new method for finding render templates and files. Rspec-rails implements these methods. Since the new method had not been implemented in Rspec yet, I've added this temporary monkeypatch until a new version of rspec-rails is release and we can upgrade to it. See rspec/rspec-rails#1532 for discussion around the issue. And rspec/rspec-rails#1533 for the current PR open to resolve it in the gem.
Also affecting my application's test suite after upgraded to Rails 4.2.5.1. Let me know if you need any help. |
@samphippen I couldn't find any specs that cover the existing code, but the cucumber features seem to. I wrote
But I can't get the existing testsuite to run, even before I make my changes:
explodes with
|
(ruby 2.3.0 on OS X) |
Could it be a Ruby manager issue (rvm/rbenv/chruby)? It looks like the |
Found this: rspec-rails/script/functions.sh Lines 14 to 18 in 9eee11a
|
Yeah, it's now fixed in |
example feature is nonsense but I have at least got existing features running |
@samphippen is the feature I added any good? Fails appropriately when I revert the change to view_rendering.rb |
@fcheung it's helpful! I'm not going to be able to give this my full attention until this afternoon, but @pixeltrix and I are going to push out a fix. |
Closing in favour of #1535 |
* Add monkeypatch to Rspec suite to fix lacking test method for new method in Rails. Rails 4.1.14.1 introducted a new method for finding render templates and files. Rspec-rails implements these methods. Since the new method had not been implemented in Rspec yet, I've added this temporary monkeypatch until a new version of rspec-rails is released and we can upgrade to it. See rspec/rspec-rails#1532 for discussion around the issue. And rspec/rspec-rails#1533 for the current PR open to resolve it in the gem. * Change specs from testing a 404 template render to a 404 response code Rspec-Rails 3.1.0 doesn't like testing the rendering of templates for Rails 4.1.14.1 with Rails' introduction of some fixes to template paths. In these tests for 404 responses, I've replaced the expectations of a certain template rendering with expectations of 404 status code. May circle back and add template rendering tests back in once Rails and rspec-rails get along again. * Bump phantomjs to get rid of deprecation warning.
* Add monkeypatch to Rspec suite to fix lacking test method for new method in Rails. Rails 4.1.14.1 introducted a new method for finding render templates and files. Rspec-rails implements these methods. Since the new method had not been implemented in Rspec yet, I've added this temporary monkeypatch until a new version of rspec-rails is released and we can upgrade to it. See rspec/rspec-rails#1532 for discussion around the issue. And rspec/rspec-rails#1533 for the current PR open to resolve it in the gem. * Change specs from testing a 404 template render to a 404 response code Rspec-Rails 3.1.0 doesn't like testing the rendering of templates for Rails 4.1.14.1 with Rails' introduction of some fixes to template paths. In these tests for 404 responses, I've replaced the expectations of a certain template rendering with expectations of 404 status code. May circle back and add template rendering tests back in once Rails and rspec-rails get along again. * Bump phantomjs to get rid of deprecation warning.
This should fix #1532