1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00

do not change factory name when passed as symbol

This commit is contained in:
Wojciech Wnętrzak 2011-10-27 21:45:37 +02:00
parent c26c71f892
commit 33371964fd

View file

@ -8,7 +8,7 @@ module FactoryGirl
def initialize(name, options = {}) #:nodoc:
assert_valid_options(options)
@name = name.to_s.underscore.to_sym
@name = name.is_a?(Symbol) ? name : name.to_s.underscore.to_sym
@parent = options[:parent]
@aliases = options[:aliases] || []
@traits = options[:traits] || []