Sha256: 757a1f33a2686345f322c9f5642c58f0e6a48edb41c9a55ad86c321b5655ef06

Contents?: true

Size: 828 Bytes

Versions: 18

Compression:

Stored size: 828 Bytes

Contents

require 'active_record'

# Create an in-memory sqlite3 database
ActiveRecord::Base.establish_connection(
  :adapter  => "sqlite3",
  :database => ":memory:"
)

# Schema
ActiveRecord::Base.silence do
  ActiveRecord::Migration.verbose = false

  ActiveRecord::Schema.define do
    create_table "users", :force => true do |t|
      t.column "name",  :text
      t.column "email", :text
      t.timestamps
    end

    create_table "companies", :force => true do |t|
      t.column "name",  :text
      t.column "owner_id", :integer
      t.column "country_id", :integer
      t.column "employees", :integer
      t.timestamps
    end

    create_table "empty_user_relations", :force => true do |t|
      t.column "user_id", :integer
    end
  end
end

Dir[File.join(File.dirname(__FILE__), 'models', '*.rb')].each { |f| require f }

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
arid_cache-1.4.4 test/lib/db_prepare.rb
arid_cache-1.4.3 test/lib/db_prepare.rb
arid_cache-1.4.2 test/lib/db_prepare.rb
arid_cache-1.4.1 test/lib/db_prepare.rb
arid_cache-1.4.0 test/lib/db_prepare.rb
arid_cache-1.3.6 test/lib/db_prepare.rb
arid_cache-1.3.5 test/lib/db_prepare.rb
arid_cache-1.3.4 test/lib/db_prepare.rb
arid_cache-1.3.3 test/lib/db_prepare.rb
arid_cache-1.3.2 test/lib/db_prepare.rb
arid_cache-1.3.1 test/lib/db_prepare.rb
arid_cache-1.3.0 test/lib/db_prepare.rb
arid_cache-1.2.0 test/lib/db_prepare.rb
arid_cache-1.1.1 test/lib/db_prepare.rb
djmaze-arid_cache-1.1.0 test/lib/db_prepare.rb
arid_cache-1.1.0 test/lib/db_prepare.rb
arid_cache-1.0.4 test/lib/db_prepare.rb
arid_cache-1.0.3 test/lib/db_prepare.rb