mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
![Avielle](/assets/img/avatar_default.png)
Also: add a deprecation warning to factory_girl, asking users to switch to factory_bot https://github.com/thoughtbot/factory_girl/issues/921
16 lines
280 B
Ruby
16 lines
280 B
Ruby
module FactoryBot
|
|
class Attribute
|
|
# @api private
|
|
class Static < Attribute
|
|
def initialize(name, value, ignored)
|
|
super(name, ignored)
|
|
@value = value
|
|
end
|
|
|
|
def to_proc
|
|
value = @value
|
|
-> { value }
|
|
end
|
|
end
|
|
end
|
|
end
|