Sha256: 768453d687e12dbace82adb3241f69a20e0a66c4b9bd14f1249e28eaa64ec0aa

Contents?: true

Size: 851 Bytes

Versions: 7

Compression:

Stored size: 851 Bytes

Contents

# borrowed from https://github.com/ernie/meta_where/blob/master/test/helper.rb
# with slight modifications
require "rubygems"
require "bundler"
Bundler.setup
require 'test/unit'
require 'shoulda'
require 'active_record'
require 'active_record/fixtures'
require 'dase'

FIXTURES_PATH = File.join(File.dirname(__FILE__), 'fixtures')

ActiveRecord::Base.establish_connection(
    :adapter => defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3',
    :database => ':memory:'
)

dep = defined?(ActiveSupport::Dependencies) ? ActiveSupport::Dependencies : ::Dependencies
dep.autoload_paths.unshift FIXTURES_PATH

ActiveRecord::Base.silence do
  ActiveRecord::Migration.verbose = false
  load File.join(FIXTURES_PATH, 'schema.rb')
end

ActiveRecord::Fixtures.create_fixtures(FIXTURES_PATH, ActiveRecord::Base.connection.tables)

class Test::Unit::TestCase
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dase-3.2.9 test/helper.rb
dase-3.2.7 test/helper.rb
dase-3.2.6 test/helper.rb
dase-3.2.5 test/helper.rb
dase-3.2.4 test/helper.rb
dase-3.2.2 test/helper.rb
dase-3.2.1 test/helper.rb