Sha256: 880cb1ee4612ba7e44f0e9f6dc7e54833533c14800e0277e1c9fcd9099c31e81

Contents?: true

Size: 947 Bytes

Versions: 6

Compression:

Stored size: 947 Bytes

Contents

require 'refinerycms-core'
require 'rspec-rails'
require 'factory_girl_rails'

module Refinery
  autoload :TestingGenerator, 'generators/refinery/testing/testing_generator'

  module Testing
    class << self
      def root
        @root ||= Pathname.new(File.expand_path('../../../', __FILE__))
      end

      # Load the factories of all currently loaded extensions
      def load_factories
        Refinery.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
    end

    require 'refinery/testing/railtie'
    require 'refinery/testing/url_helper'

    autoload :ControllerMacros, 'refinery/testing/controller_macros'
    autoload :RequestMacros, 'refinery/testing/request_macros'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
refinerycms-testing-2.0.5 lib/refinery/testing.rb
refinerycms-testing-2.0.4 lib/refinery/testing.rb
refinerycms-testing-2.0.3 lib/refinery/testing.rb
refinerycms-testing-2.0.2 lib/refinery/testing.rb
refinerycms-testing-2.0.1 lib/refinery/testing.rb
refinerycms-testing-2.0.0 lib/refinery/testing.rb