Sha256: cbad969dab55a634ca5ca0c14201b8dea7ba86b31de343f594dc7fab4b7584bd

Contents?: true

Size: 934 Bytes

Versions: 2

Compression:

Stored size: 934 Bytes

Contents

require 'refinerycms-core'
require 'rspec-rails'
require 'factory_girl'
require 'rails-controller-testing'

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'

    autoload :ControllerMacros, 'refinery/testing/controller_macros'
    autoload :FeatureMacros, 'refinery/testing/feature_macros'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
refinerycms-testing-4.0.1 lib/refinery/testing.rb
refinerycms-testing-4.0.0 lib/refinery/testing.rb