Sha256: 02d80ed43bba50595c58f3e44f6da86a7edc67065b3124ba6b8e30c15f4d9fa8
Contents?: true
Size: 975 Bytes
Versions: 4
Compression:
Stored size: 975 Bytes
Contents
ENV["RAILS_ENV"] = "test" # Boot rails application and testing parts ... require "fixtures/rails_app/config/environment" require "rails/test_help" # As we are simulating the application we need to reload the # configurations to get the custom paths. Typus.reload! # Different DB settings and load our schema. connection = case ENV["DB"] when "mysql" { :adapter => "mysql", :database => "typus_test" } when "pg" { :adapter => "postgresql", :database => "typus_test", :encoding => "unicode" } else { :adapter => "sqlite3", :database => ":memory:" } end ActiveRecord::Base.establish_connection(connection) load File.join(File.dirname(__FILE__), "schema.rb") Dir[File.join(File.dirname(__FILE__), "factories", "**","*.rb")].each { |factory| require factory } class ActiveSupport::TestCase self.use_transactional_fixtures = true self.use_instantiated_fixtures = false end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
typus-1.0.0.pre4 | test/test_helper.rb |
typus-1.0.0.pre3 | test/test_helper.rb |
typus-1.0.0.pre2 | test/test_helper.rb |
typus-1.0.0.pre | test/test_helper.rb |