Sha256: 09304802d995b2d6f2ea161ce16a9628baaec3b1cdd5d1d2a238b177e6dc1971

Contents?: true

Size: 648 Bytes

Versions: 7

Compression:

Stored size: 648 Bytes

Contents

require 'rails/generators'

module Minitest
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      class_option :active_record, type: :boolean, default: true, desc: "Add ActiveRecord configuration"

      desc <<DESC
Description:
    Copy minitest files to your application.
DESC

      def self.source_root
        @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
      end

      def copy_minitest_files
        template 'test_helper.rb', File.join("test", "test_helper.rb")
      end

      def add_migration_check
        ::Rails::VERSION::STRING >= "4.0"
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
minitest-rails-2.1.1 lib/generators/minitest/install/install_generator.rb
minitest-rails-2.1.0 lib/generators/minitest/install/install_generator.rb
minitest-rails-2.0.3 lib/generators/minitest/install/install_generator.rb
minitest-rails-2.0.2 lib/generators/minitest/install/install_generator.rb
minitest-rails-2.0.1 lib/generators/minitest/install/install_generator.rb
minitest-rails-2.0.0 lib/generators/minitest/install/install_generator.rb
minitest-rails-2.0.0.beta1 lib/generators/minitest/install/install_generator.rb