Sha256: 29bf66f8144d6d906fa554ece53f388fd6b7cf06b279016c444f3d80521f7335

Contents?: true

Size: 677 Bytes

Versions: 2

Compression:

Stored size: 677 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

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

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

2 entries across 2 versions & 1 rubygems

Version Path
rspec-paper_trail-0.0.9 spec/spec_helper.rb
rspec-paper_trail-0.0.8 spec/spec_helper.rb