Sha256: c697b5b30f82450e4906e568bce3cbc7131ebd4e09f130ac518a8567cd059858

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

require "codeclimate-test-reporter"
CodeClimate::TestReporter.start

require 'mocha/mini_test'

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'simon_says' # HELLO SIMON

# Load test/rails_app
ENV["RAILS_ENV"] = "test"

require File.expand_path("../rails_app/config/environment.rb",  __FILE__)
require "rails/test_help"

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# Load fixtures from the engine
ActiveSupport::TestCase.fixture_path = File.expand_path("../rails_app/test/fixtures", __FILE__)
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path

# Make ActiveRecord happy
ActiveRecord::Base.logger = Logger.new(nil)
ActiveRecord::Migration.verbose = false

class ActiveSupport::TestCase
  include ActiveRecord::TestFixtures

  fixtures :all

  def create_test_table(name, &block)
    with_migration { |m| m.create_table name, &block }
  end

  def drop_test_table(name, opts = {})
    with_migration { |m| m.drop_table name, opts }
  end

  protected

  def with_migration
    ActiveRecord::Migration.tap do |m|
      m.verbose = false
      yield m
      m.verbose = true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simon_says-0.1.5 test/test_helper.rb