Sha256: 444cd436cf1c30150fbc00630eecf1abf3d8f601d10975b0077c9abec2b7f9cb

Contents?: true

Size: 928 Bytes

Versions: 1

Compression:

Stored size: 928 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../dummy/config/environment', __FILE__)
require 'rspec/rails'
require 'rspec/autorun'

require 'rails'
require 'active_record'
require 'paper_trail'
require 'rspec/paper_trail'

Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }

RSpec.configure do |config|
  config.order = 'random'
end

ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')

ActiveRecord::Schema.define(version: 1) do
  create_table :models do |t|
    t.string :name
    t.string :color
  end
  create_table :versions do |t|
    t.string   :item_type, null: false
    t.integer  :item_id,   null: false
    t.string   :event,     null: false
    t.string   :whodunnit
    t.text     :object
    t.datetime :created_at
  end
end

class Model < ActiveRecord::Base
  has_paper_trail
  attr_accessible :name, :color
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-paper_trail-0.0.10 spec/spec_helper.rb