Sha256: 58ebd465bc2cbdb41616d0ed05e33ceb01da5f5bee2c1eb7f5c2b162e80042ad
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'active_record/railtie' ActiveRecord::Base.logger = Logger.new(STDERR) ActiveRecord::Base.logger.level = 3 require 'acts-as-taggable-array-on' #Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} ActiveRecord::Migration.verbose = false class User < ActiveRecord::Base; end RSpec.configure do |config| config.before(:all) do ActiveRecord::Base.establish_connection( adapter: "postgresql", encoding: 'unicode', database: "acts-as-taggable-array-on_test", username: "acts-as-taggable-array-on" ) create_database end config.after(:all) do drop_database end config.after(:each) do User.delete_all end end def create_database ActiveRecord::Schema.define(:version => 1) do create_table :users do |t| t.text :colors, array: true, defualt: '{}' t.timestamps end end end def drop_database ActiveRecord::Base.connection.tables.each do |table| ActiveRecord::Base.connection.drop_table(table) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts-as-taggable-array-on-0.1.1 | spec/spec_helper.rb |