Sha256: 363e2941a246980c345d13ac1feb29cd69ab7338eec90313b797f75d4273e07d

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

require "minitest/autorun"
require 'mocha/minitest'

$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

4 entries across 4 versions & 1 rubygems

Version Path
simon_says-0.3.0.alpha.7 test/test_helper.rb
simon_says-0.3.0.alpha.6 test/test_helper.rb
simon_says-0.3.0.alpha.5 test/test_helper.rb
simon_says-0.3.0.alpha.4 test/test_helper.rb