-
Notifications
You must be signed in to change notification settings - Fork 51
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
Rspec - Failure/Error: render - ActionView::Template::Error #31
Comments
Which version on |
0.3.1 |
There is only one place in the code source where I used Which version of rails are you using? Do you use another gem that deals with controller or it is vanilla rails ? |
I am using rails 3.2.13. The problem only occurs with rspec. Is there any way to see the compiled view '_app_views_v__medias_show_rabl___3750579331352501291_55842580' ? |
Hmm, I also use RSpec and I never ran into this issue. No the compiled view is from But, you can try to monkey patch RablRails in you module RablRails
module Renderers
class Base
private
def setup_render_context
@_context.instance_variable_get(:@_assigns).each_pair { |k, v|
instance_variable_set("@#{k}", v) unless k.to_s.start_with?('_')
}
end
end
end
end That should fix your issue, and I will include it in the next release. |
Yep it fixes the problem. Thanks! |
I close this issue but you should create an entry in the Wiki addressing this problem. |
Added in #37 |
I switched from rabl to rabl-rails. It works great except during the tests (rspec).
My view:
My test:
The error:
The text was updated successfully, but these errors were encountered: