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:
parent
c26c71f892
commit
33371964fd
1 changed files with 1 additions and 1 deletions
|
@ -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] || []
|
||||
|
|
Loading…
Add table
Reference in a new issue