lib/fun_with/testing/test_case_extensions.rb
# assumes the gem has a test/factories folder, just requir's everything
# from that directory.  
assumes the gem has a test/factories folder, just requir's everything
from that directory.
assumes the gem has a test / factories folder just requir ' s everything from that directory .
def add_factorybot_support
        unless defined?( FactoryBot )
          begin
            require 'factory_bot'
          rescue LoadError
            puts "Error: FactoryBot support requested, but FactoryBot could not be loaded.  make sure the factory_bot gem is listed in your Gemfile, then run `bundle install`."
          end
        end
        FactoryBot.find_definitions if defined?( FactoryBot )   
      end
def add_factorybot_support unless defined? ( FactoryBot ) begin require 'factory_bot' rescue LoadError puts "Error: FactoryBot support requested, but FactoryBot could not be loaded.  make sure the factory_bot gem is listed in your Gemfile, then run `bundle install`." end end FactoryBot . find_definitions if defined? ( FactoryBot ) end
assumes the gem has a test/factories folder, just requir's everything
from that directory.
assumes the gem has a test / factories folder just requir ' s everything from that directory .
# loads factories, test/factories, and spec/factories if they exist (directory or .rb file) 