Sha256: e7984e1b9ed23cb3bf800d046265aab118bf91d2f2cf85e7f054d411cc8643ce
Contents?: true
Size: 980 Bytes
Versions: 7
Compression:
Stored size: 980 Bytes
Contents
require 'active_record' require 'generators/purgatory/templates/create_purgatories' require 'purgatory/purgatory_module' ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" ActiveRecord::Migration.create_table :widgets do |t| t.string :name t.integer :price t.string :original_name t.timestamps end ActiveRecord::Migration.create_table :users do |t| t.string :name t.timestamps end ActiveRecord::Migration.create_table :animals do |t| t.string :name t.string :type t.integer :price t.string :original_name end ActiveRecord::Migration.create_table :items do |t| t.string :name t.integer :price t.string :original_name t.timestamps end CreatePurgatories.new.migrate(:up) PurgatoryModule.configure do |config| config.user_class_name = 'User' end RSpec.configure do |config| config.around do |example| ActiveRecord::Base.transaction do example.run raise ActiveRecord::Rollback end end end
Version data entries
7 entries across 7 versions & 1 rubygems