Sha256: 243dd73f8a08f2c33f9cf1e8d5ed5759e5b32c4391fbb01d70a2fb00db7ac6c4

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

$VERBOSE = nil
require 'rubygems'
require 'echoe'
require 'test/unit'
require 'multi_rails_init'
require 'ruby-debug'

if defined? ENV['MULTIRAILS_RAILS_VERSION']
  ENV['RAILS_GEM_VERSION'] = ENV['MULTIRAILS_RAILS_VERSION']
end

Echoe.silence do
  HERE = File.expand_path(File.dirname(__FILE__))
  $LOAD_PATH << HERE
  # $LOAD_PATH << "#{HERE}/integration/app"
end

LOG = "#{HERE}/integration/app/log/development.log"     

### For unit tests

require 'integration/app/config/environment'
require 'test_help'

ActiveSupport::Inflector.inflections {|i| i.irregular 'fish', 'fish' }

$LOAD_PATH.unshift(Test::Unit::TestCase.fixture_path = HERE + "/fixtures")
$LOAD_PATH.unshift(HERE + "/models")
$LOAD_PATH.unshift(HERE + "/modules")

class Test::Unit::TestCase
  self.use_transactional_fixtures = !(ActiveRecord::Base.connection.is_a? ActiveRecord::ConnectionAdapters::MysqlAdapter rescue false)
  self.use_instantiated_fixtures  = false
end

Echoe.silence do
  load(HERE + "/schema.rb")
end

### For integration tests

def truncate
  system("> #{LOG}")
end

def log
  File.open(LOG, 'r') do |f|
    f.read
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
johnsbrn-has_many_polymorphs-2.13.3 test/test_helper.rb
has_many_polymorphs-2.13 test/test_helper.rb