Sha256: d3fe6ca52f16968e91142b72becd3cc4ebb27c19140ea9737757f646c3cb45e0

Contents?: true

Size: 983 Bytes

Versions: 4

Compression:

Stored size: 983 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 "postgresql"
               { :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.pre8 test/test_helper.rb
typus-1.0.0.pre7 test/test_helper.rb
typus-1.0.0.pre6 test/test_helper.rb
typus-1.0.0.pre5 test/test_helper.rb