Sha256: a1df28e25e840c142cea3bbdfc6bb0c5dfb21c89fb1b29e4b1e624b9fe563c92

Contents?: true

Size: 912 Bytes

Versions: 39

Compression:

Stored size: 912 Bytes

Contents

# frozen_string_literal: true

require "minitest"
require "rails/test_unit/runner"

task default: :test

desc "Run all tests in test folder except system ones"
task :test do
  Rails::TestUnit::Runner.run_from_rake("test", Array(ENV["TEST"]))
end

namespace :test do
  task :prepare do
    # Placeholder task for other Railtie and plugins to enhance.
    # If used with Active Record, this task runs before the database schema is synchronized.
  end

  task run: %w[test]

  desc "Reset the database and run `bin/rails test`"
  task :db do
    success = system({ "RAILS_ENV" => ENV.fetch("RAILS_ENV", "test") }, "rake", "db:test:prepare", "test")
    success || exit(false)
  end

  [
    *Rails::TestUnit::Runner::TEST_FOLDERS,
    :all,
    :generators,
    :units,
    :functionals,
    :system,
  ].each do |name|
    task name do
      Rails::TestUnit::Runner.run_from_rake("test:#{name}")
    end
  end
end

Version data entries

39 entries across 39 versions & 5 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/railties-7.1.3.4/lib/rails/test_unit/testing.rake
railties-8.0.1 lib/rails/test_unit/testing.rake
railties-8.0.0.1 lib/rails/test_unit/testing.rake
railties-7.2.2.1 lib/rails/test_unit/testing.rake
railties-7.1.5.1 lib/rails/test_unit/testing.rake
railties-8.0.0 lib/rails/test_unit/testing.rake
railties-7.2.2 lib/rails/test_unit/testing.rake
railties-7.1.5 lib/rails/test_unit/testing.rake
railties-8.0.0.rc2 lib/rails/test_unit/testing.rake
railties-7.2.1.2 lib/rails/test_unit/testing.rake
railties-7.1.4.2 lib/rails/test_unit/testing.rake
railties-8.0.0.rc1 lib/rails/test_unit/testing.rake
railties-7.2.1.1 lib/rails/test_unit/testing.rake
railties-7.1.4.1 lib/rails/test_unit/testing.rake
railties-8.0.0.beta1 lib/rails/test_unit/testing.rake
omg-railties-8.0.0.alpha9 lib/rails/test_unit/testing.rake
omg-railties-8.0.0.alpha8 lib/rails/test_unit/testing.rake
omg-railties-8.0.0.alpha7 lib/rails/test_unit/testing.rake
omg-railties-8.0.0.alpha4 lib/rails/test_unit/testing.rake
omg-railties-8.0.0.alpha3 lib/rails/test_unit/testing.rake