mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
526f907629
Does not run rails specs when running mongoid specs WIP Start of remove BRE to check tests Remove old helper of active record Use RSpec skip to skip AR specs Run ActionView only when needed Run ActiveSupport only when needed Run Mongoid only when needed Create ExtVerifier.require_dependencies Run MongoMapper only when needed Always load nokogiri specs Always load ostruct specs Run Ripple only when needed Remove :: when check for defined constants Require spec_helper directly Remove 1.8.6 old monkey patch Add some RSpec configs
24 lines
558 B
Ruby
24 lines
558 B
Ruby
if ExtVerifier.has_rails?
|
|
# Required to use the column support
|
|
module Rails
|
|
def self.env
|
|
{}
|
|
end
|
|
end
|
|
|
|
# Establish connection to in-memory SQLite DB
|
|
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
|
|
|
|
# Create the users table
|
|
ActiveRecord::Migration.verbose = false
|
|
ActiveRecord::Migration.create_table :users do |t|
|
|
t.string :name
|
|
t.integer :rank
|
|
t.boolean :admin
|
|
t.datetime :created_at
|
|
end
|
|
|
|
# Create models
|
|
class User < ActiveRecord::Base; end
|
|
class SubUser < User; end
|
|
end
|