Sha256: 9ef13fbcd8fdbc37f7054828186f974f778e4187d9e1b47d56d0f8e6e91ede64

Contents?: true

Size: 883 Bytes

Versions: 6

Compression:

Stored size: 883 Bytes

Contents

# frozen_string_literal: true
require "pry" unless ENV["CI"]
require "measured"
require "measured-rails"
require "minitest/autorun"
require "minitest/reporters"
require "mocha/minitest"

ActiveSupport.test_order = :random

# Prevent two reporters from printing
# https://github.com/kern/minitest-reporters/issues/230
# https://github.com/rails/rails/issues/30491
Minitest.load_plugins
Minitest.extensions.delete('rails')
Minitest.extensions.unshift('rails')

Minitest::Reporters.use! [Minitest::Reporters::ProgressReporter.new(color: true)]

class ActiveSupport::TestCase
  def reset_db
    ActiveRecord::Base.subclasses.each do |model|
      model.delete_all
    end
  end
end

Dir.glob(File.expand_path("../support/models/*.rb", __FILE__)).each { |r| require r }
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
require_relative "support/schema.rb"

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
measured-rails-2.8.2 test/test_helper.rb
measured-rails-2.8.1 test/test_helper.rb
measured-rails-2.8.0 test/test_helper.rb
measured-rails-2.7.1 test/test_helper.rb
measured-rails-2.6.0 test/test_helper.rb
measured-rails-2.5.2 test/test_helper.rb