Sha256: 02dbbe3bb5509f1a1f110892232e0c989cdeec77ff4b7fbc0355e4a9f23a714b

Contents?: true

Size: 1.2 KB

Versions: 20

Compression:

Stored size: 1.2 KB

Contents

require "rails/generators"
require "rails/generators/testing/behaviour"
require "rails/generators/testing/setup_and_teardown"
require "rails/generators/testing/assertions"
require "fileutils"

module Rails
  module Generators
    # Disable color in output. Easier to debug.
    no_color!

    # This class provides a TestCase for testing generators. To setup, you need
    # just to configure the destination and set which generator is being tested:
    #
    #   class AppGeneratorTest < Rails::Generators::TestCase
    #     tests AppGenerator
    #     destination File.expand_path("../tmp", File.dirname(__FILE__))
    #   end
    #
    # If you want to ensure your destination root is clean before running each test,
    # you can set a setup callback:
    #
    #   class AppGeneratorTest < Rails::Generators::TestCase
    #     tests AppGenerator
    #     destination File.expand_path("../tmp", File.dirname(__FILE__))
    #     setup :prepare_destination
    #   end
    class TestCase < ActiveSupport::TestCase
      include Rails::Generators::Testing::Behaviour
      include Rails::Generators::Testing::SetupAndTeardown
      include Rails::Generators::Testing::Assertions
      include FileUtils
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
railties-5.1.7 lib/rails/generators/test_case.rb
railties-5.1.7.rc1 lib/rails/generators/test_case.rb
railties-5.1.6.2 lib/rails/generators/test_case.rb
railties-5.1.6.1 lib/rails/generators/test_case.rb
railties-5.1.6 lib/rails/generators/test_case.rb
railties-5.1.5 lib/rails/generators/test_case.rb
railties-5.1.5.rc1 lib/rails/generators/test_case.rb
railties-5.1.4 lib/rails/generators/test_case.rb
railties-5.1.4.rc1 lib/rails/generators/test_case.rb
railties-5.1.3 lib/rails/generators/test_case.rb
railties-5.1.3.rc3 lib/rails/generators/test_case.rb
railties-5.1.3.rc2 lib/rails/generators/test_case.rb
railties-5.1.3.rc1 lib/rails/generators/test_case.rb
railties-5.1.2 lib/rails/generators/test_case.rb
railties-5.1.2.rc1 lib/rails/generators/test_case.rb
railties-5.1.1 lib/rails/generators/test_case.rb
railties-5.1.0 lib/rails/generators/test_case.rb
railties-5.1.0.rc2 lib/rails/generators/test_case.rb
railties-5.1.0.rc1 lib/rails/generators/test_case.rb
railties-5.1.0.beta1 lib/rails/generators/test_case.rb