Sha256: 9dd94a277758e592585de5aa0dfc7d26e2ac9f96d77922833ddbeb6b1a7ca014
Contents?: true
Size: 798 Bytes
Versions: 2
Compression:
Stored size: 798 Bytes
Contents
require 'rubygems' require 'test/unit' require 'active_record' require 'logger' require 'has_translations' begin I18n.available_locales = :ru, :en, :es rescue p '[WARNING]: This test should have the I18n.available_locales= method, which were included in versions ~> 0.3.0' end puts "Using Rails version: #{ActiveRecord::VERSION::STRING}" ActiveRecord::Base.logger = Logger.new('test.log') #ActiveRecord::Base.logger = nil ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:') def setup_db ActiveRecord::Migration.verbose = false load 'schema.rb' end def teardown_db ActiveRecord::Base.connection.public_send(ActiveRecord::VERSION::MAJOR >= 5 ? :data_sources : :tables).each do |table| ActiveRecord::Base.connection.drop_table(table) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
has_translations-1.1.2 | test/test_helper.rb |
has_translations-1.1.1 | test/test_helper.rb |