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

Don't outline behavior with the method name

This commit is contained in:
Joshua Clayton 2012-05-05 00:49:04 -04:00
parent 2d01b6f793
commit 90f0072f84
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ module FactoryGirl
end
end
def self.define_cached_attribute(name, &block)
def self.define_attribute(name, &block)
define_method(name) do
if @cached_attributes.key?(name)
@cached_attributes[name]
@ -34,7 +34,7 @@ module FactoryGirl
@cached_attributes = overrides
@overrides.each do |name, value|
singleton_class.define_cached_attribute(name) { value }
singleton_class.define_attribute(name) { value }
end
end

View file

@ -5,7 +5,7 @@ module FactoryGirl
@attributes = attributes
attributes.each do |attribute|
evaluator_class.define_cached_attribute(attribute.name, &attribute.to_proc)
evaluator_class.define_attribute(attribute.name, &attribute.to_proc)
end
end