Sha256: 5a4d5e41d0e75b8417e78242a3282cd7431a73282f3349c147de91202cab86e0

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

require 'rubygems'
gem 'rspec'
gem 'activerecord'

$:.unshift(File.dirname(__FILE__) + '/../lib')
$:.unshift(File.dirname(__FILE__) + '/fixtures')

require 'active_record'
require 'active_record/fixtures'
gem 'pg'
begin
  gem 'arel'
rescue Gem::LoadError
  require 'fake_arel'
  class ActiveRecord::Base
    named_scope :joins, lambda {|*join| {:joins => join } if join[0]}
  end
end
require 'cancan'
require 'cancan/matchers'
require 'ar_pg_array'


ActiveRecord::Base.establish_connection(
  :adapter => 'postgresql',
  :database => 'postgres',
  :encoding => 'utf8'
)
ActiveRecord::Base.connection.create_database('test_pg_array', :encoding=>'utf8') rescue nil

ActiveRecord::Base.establish_connection(
  :adapter => 'postgresql',
  :database => 'test_pg_array',
  :encoding => 'utf8'
)
ActiveRecord::Base.logger = Logger.new(STDOUT) #if $0 == 'irb'

require 'tag'
require 'item'
require 'bulk'
ActiveRecord::Base.silence do
  ActiveRecord::Migration.verbose = false

  # load schema
  load File.join('spec/fixtures/schema.rb')
  # load fixtures
  Fixtures = ActiveRecord::Fixtures  unless defined?(Fixtures)
  Fixtures.create_fixtures("spec/fixtures", ActiveRecord::Base.connection.tables)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ar_pg_array-0.9.13 spec/spec_helper.rb
ar_pg_array-0.9.12 spec/spec_helper.rb