Module: Alchemrest::FactoryBot

Defined in:
lib/alchemrest/factory_bot.rb

Defined Under Namespace

Modules: Mixins Classes: AlchemrestStrategy, HashStrategy, OmitKey

Class Method Summary collapse

Class Method Details

.enable!Object



5
6
7
8
9
10
11
12
# File 'lib/alchemrest/factory_bot.rb', line 5

def self.enable!
  ::FactoryBot.register_strategy(:alchemrest_record_for, Alchemrest::FactoryBot::AlchemrestStrategy)
  ::FactoryBot.register_strategy(:alchemrest_hash_for, Alchemrest::FactoryBot::HashStrategy)

  ::FactoryBot::Syntax::Default::DSL.class_eval do
    include Alchemrest::FactoryBot::Mixins
  end
end