Sha256: afbd482be75c9f3e1641c59b3044e5b9c4b3f1139dd39c348d552e3120d64207

Contents?: true

Size: 1.02 KB

Versions: 28

Compression:

Stored size: 1.02 KB

Contents

module Refinery
  module Testing
    class Railtie < Rails::Railtie
      railtie_name :refinerycms_testing

      class << self
        attr_reader :target_extension_path # :nodoc:
        alias_method :target_engine_path, :target_extension_path

        # Loads Rake tasks to assist with manipulating dummy applications for testing extensions. Takes
        # a string representing the path to your application or extension.
        #
        # This function should be used in the Rakefile of your application or extension
        #
        # Example:
        #   Refinery::Testing::Railtie.load_dummy_tasks(File.dirname(__FILE__))
        #
        #   Refinery::Testing::Railtie.load_dummy_tasks('/users/reset/code/mynew_app')
        def load_dummy_tasks(app_root)
          @target_extension_path = Pathname.new(app_root.to_s)
          load 'refinery/tasks/testing.rake'
        end
      end

      config.after_initialize do
        Refinery.register_extension(Refinery::Testing)
        Testing.load_factories
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
refinerycms-testing-4.0.3 lib/refinery/testing/railtie.rb
refinerycms-testing-4.0.2 lib/refinery/testing/railtie.rb
refinerycms-testing-4.0.1 lib/refinery/testing/railtie.rb
refinerycms-testing-3.0.6 lib/refinery/testing/railtie.rb
refinerycms-testing-4.0.0 lib/refinery/testing/railtie.rb
refinerycms-testing-3.0.5 lib/refinery/testing/railtie.rb
refinerycms-testing-3.0.4 lib/refinery/testing/railtie.rb
refinerycms-testing-3.0.3 lib/refinery/testing/railtie.rb
refinerycms-testing-3.0.2 lib/refinery/testing/railtie.rb
refinerycms-testing-3.0.1 lib/refinery/testing/railtie.rb
refinerycms-testing-3.0.0 lib/refinery/testing/railtie.rb
refinerycms-testing-2.1.5 lib/refinery/testing/railtie.rb
refinerycms-testing-2.1.4 lib/refinery/testing/railtie.rb
refinerycms-testing-2.1.3 lib/refinery/testing/railtie.rb
refinerycms-testing-2.1.2 lib/refinery/testing/railtie.rb
refinerycms-testing-2.1.1 lib/refinery/testing/railtie.rb
refinerycms-testing-2.1.0 lib/refinery/testing/railtie.rb
refinerycms-testing-2.0.10 lib/refinery/testing/railtie.rb
refinerycms-testing-2.0.9 lib/refinery/testing/railtie.rb
refinerycms-testing-2.0.8 lib/refinery/testing/railtie.rb