Sha256: 4c47588407ead1eb440fb6aac64315ba3f53867c3cd78be45f7803977a2ebe31

Contents?: true

Size: 514 Bytes

Versions: 6

Compression:

Stored size: 514 Bytes

Contents

puts 'To run specs with database backend (ActiveRecord), use:'
puts '$ rspec -rdb spec'

require 'yaml'
require 'pathname'
require 'ib/db'
require 'database_cleaner'

# Load DB config, determine correct environment
db_file = Pathname.new(__FILE__).realpath.dirname + '../db/config.yml'
raise "Unable to find DB config file: #{db_file}" unless db_file.exist?

env = RUBY_PLATFORM =~ /java/ ? 'test' : 'test-mri'
db_config = YAML::load_file(db_file)[env]

# Establish connection to test DB
IB::DB.connect db_config

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ib-ruby-0.9.2 spec/db.rb
ib-ruby-0.9.1 spec/db.rb
ib-ruby-0.9.0 spec/db.rb
ib-ruby-0.8.5 spec/db.rb
ib-ruby-0.8.4 spec/db.rb
ib-ruby-0.8.3 spec/db.rb