module Answers::Testing

Public Class Methods

load_factories() click to toggle source

Load the factories of all currently loaded extensions

# File lib/answers/testing.rb, line 16
def load_factories
  Answers.extensions.each do |extension_const|
    if extension_const.respond_to?(:factory_paths)
      extension_const.send(:factory_paths).each do |path|
        FactoryGirl.definition_file_paths << path
      end
    end
  end
  FactoryGirl.find_definitions
end
root() click to toggle source
# File lib/answers/testing.rb, line 11
def root
  @root ||= Pathname.new(File.expand_path('../../../', __FILE__))
end