mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Expose @overrides through a instance method
This commit is contained in:
parent
2e15a3f429
commit
d3f6090a8f
2 changed files with 5 additions and 1 deletions
|
@ -40,7 +40,7 @@ module FactoryGirl
|
|||
def attribute_names_to_assign
|
||||
non_ignored_attribute_names = @attribute_list.reject(&:ignored).map(&:name)
|
||||
ignored_attribute_names = @attribute_list.select(&:ignored).map(&:name)
|
||||
override_names = @evaluator.instance_variable_get(:@overrides).keys
|
||||
override_names = @evaluator.__overrides.keys
|
||||
non_ignored_attribute_names + override_names - ignored_attribute_names
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,5 +15,9 @@ module FactoryGirl
|
|||
super
|
||||
end
|
||||
end
|
||||
|
||||
def __overrides
|
||||
@overrides
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue