Sha256: 1fdc3a6b412e289619ec91e8162c0272b80c8f143db918ef5a74ca2b7df6b1bc

Contents?: true

Size: 519 Bytes

Versions: 7

Compression:

Stored size: 519 Bytes

Contents

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

require 'yaml'
require 'pathname'
require 'ib-ruby/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

7 entries across 7 versions & 1 rubygems

Version Path
ib-ruby-0.8.1 spec/db.rb
ib-ruby-0.8.0 spec/db.rb
ib-ruby-0.7.12 spec/db.rb
ib-ruby-0.7.11 spec/db.rb
ib-ruby-0.7.10 spec/db.rb
ib-ruby-0.7.9 spec/db.rb
ib-ruby-0.7.8 spec/db.rb