1
0
Fork 0
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:
Joshua Clayton 2011-12-05 20:18:34 -05:00
parent 2e15a3f429
commit d3f6090a8f
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -15,5 +15,9 @@ module FactoryGirl
super
end
end
def __overrides
@overrides
end
end
end