Sha256: 4e02544e31f86a4dd31f81f50b1d2539a5f29d67bd78753a643c04d284f9cd1a
Contents?: true
Size: 1.23 KB
Versions: 3
Compression:
Stored size: 1.23 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.string :name t.string :colors, array: true, default: [] t.text :sizes, array:true, default: [] t.integer :codes, array: true, default: [] t.timestamps null: true end end end def drop_database ActiveRecord::Base.connection.tables.each do |table| ActiveRecord::Base.connection.drop_table(table) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
acts-as-taggable-array-on-0.6.0 | spec/spec_helper.rb |
acts-as-taggable-array-on-0.5.1 | spec/spec_helper.rb |
acts-as-taggable-array-on-0.4.2 | spec/spec_helper.rb |