thoughtbot/factory_girl — pull request #253 by elarkin (2011-12-14 22:14:34+00:00)
Title: Supplying a Class to a factory that overrides to_s no longer results in ...

...getting the wrong Class constructed

This patch allows factories to be constructed like this:

FactoryGirl::Factory.new(:name, :class => SomeConst)

even when SomeConst.to_s returns something other than "SomeConst"

Patch includes test.