Sha256: 545eb550bffca1d59bef465ec6f9595f9e5c4da1f9bdcf9e76effbaeb08f21cf
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
$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 ActiveRecord::Base.establish_connection(Rails.application.config.database_configuration[ENV['RAILS_ENV']]) ActiveRecord::Migrator.migrate(File.expand_path("../rails_app/db/migrate/", __FILE__)) class ActiveSupport::TestCase include ActiveRecord::TestFixtures fixtures :users, :admins, :documents, :'admin/reports' 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simon_says-0.0.3 | test/test_helper.rb |
simon_says-0.0.27b6 | test/test_helper.rb |