Sha256: 9bbde3def6d3db875e09cfbf6a549ea48fc735ade6586a17f9b42039d81d8523

Contents?: true

Size: 1.11 KB

Versions: 9

Compression:

Stored size: 1.11 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.create_fixtures("spec/fixtures", ActiveRecord::Base.connection.tables)
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ar_pg_array-0.9.9 spec/spec_helper.rb
ar_pg_array-0.9.7 spec/spec_helper.rb
ar_pg_array-0.9.6 spec/spec_helper.rb
ar_pg_array-0.9.5 spec/spec_helper.rb
ar_pg_array-0.9.4 spec/spec_helper.rb
ar_pg_array-0.9.3 spec/spec_helper.rb
ar_pg_array-0.9.2 spec/spec_helper.rb
ar_pg_array-0.9.1 spec/spec_helper.rb
ar_pg_array-0.9.0 spec/spec_helper.rb