module FactoryGirl::Syntax::Methods

Public Instance Methods

create_large_list(name, amount, *traits_and_overrides, &block)
Alias for: create_list
create_list(name, amount, *traits_and_overrides, &block) click to toggle source
# File lib/spec_snap/factory_girl.rb, line 10
def create_list(name, amount, *traits_and_overrides, &block)
  unless small_amount_or_special_build?(amount)
    raise ArgumentError, "You asked to create #{amount} records. For the sake of test speed (and sanity), don't do this."
  end

  create_large_list(name, amount, *traits_and_overrides, &block)
end
Also aliased as: create_large_list

Private Instance Methods

small_amount_or_special_build?(amount) click to toggle source
# File lib/spec_snap/factory_girl.rb, line 18
        def small_amount_or_special_build? amount
  amount < 3 || ENV['NIGHTLY'] || ENV['CI']
end