Sha256: d943c49a652e3be903eca2b3cb658b39c58a05e7c7e021de5fa66420cdfd5d06

Contents?: true

Size: 634 Bytes

Versions: 4

Compression:

Stored size: 634 Bytes

Contents

require "rspec"
require "ar_protobuf_store"

require "active_record"

if RUBY_VERSION > "1.8.7"
  require "codeclimate-test-reporter"
  CodeClimate::TestReporter.start
end

ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
ActiveRecord::Schema.verbose = false

def setup_db(&block)
  # ActiveRecord caches columns options like defaults etc. Clear them!
  ActiveRecord::Base.connection.schema_cache.clear!
  ActiveRecord::Schema.define(:version => 1, &block)
end

def teardown_db
  ActiveRecord::Base.connection.tables.each do |table|
    ActiveRecord::Base.connection.drop_table(table)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ar_protobuf_store-1.0.0 spec/spec_helper.rb
ar_protobuf_store-0.2.3 spec/spec_helper.rb
ar_protobuf_store-0.2.2 spec/spec_helper.rb
ar_protobuf_store-0.2.1 spec/spec_helper.rb