paulelliott/fabrication — pull request #206 by yuki24 (2014-03-22 22:57:50+00:00)
Title: UnfabricatableError should include the message of the original exception

When custom `#const_missing` is defined, it is possible to get `NameError` or `NoMethodError` from inside `#const_missing`. This is very important since widely-used ActiveSupport::Dependencies's "autoload-like" feature is made possible by using `#const_missing` and there's a lot of things that will happen when it's called.

> For more about Module#const_missing, see: http://ruby-doc.org/core-2.1.1/Module.html#method-i-const_missing

Right now, when a NameError, which is not "uninitialized constant [class_or_to_s]", is raised from inside `#const_missing`, `Fabrication::Support.class_for` just squashes the original one. Instead, elevate the original message so we can easily understand what's going on inside `#const_missing`.