rails/rails — Issue #4710: use of safe_constantize inside of TestCase#determine_default_helper_class breaks shared_examples in rspec
Author: atambo
Created: 2012-01-26 18:50:28+00:00
State: open

Commit: e8987c30 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:0x2bc56e1f" which raises:

```
NameError:
wrong constant name #
```

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