Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

3.2 use of safe_constantize inside of TestCase#determine_default_helper_class breaks shared_examples in rspec #4710

Closed
atambo opened this Issue · 0 comments

2 participants

@atambo

Commit: e8987c3 by @josevalim seems to have broken shared_examples_for in rspec. When using a shared_example the name of the class in TestCase#determine_default_helper_class (https://github.com/rails/rails/blob/e8987c30d0dc3ae5903a6d3a6e293641759b6fc4/actionpack/lib/action_view/test_case.rb#L56) is of the form "#Class:0x7b8b718b::Nested_1" which raises:

NameError:
       wrong constant name "#<Class:0x7b8b718b>::Nested_1"

And safe_constantize only handles name errors of the form "uninitialized constant".

@josevalim josevalim closed this in 7598284
@carlosantoniodasilva carlosantoniodasilva referenced this issue from a commit in carlosantoniodasilva/rails
@atambo atambo safe_constantize should handle wrong constant name NameErrors Fixes #…
…4710

Signed-off-by: José Valim <jose.valim@gmail.com>
6c367a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.