spec/spec_helper.rb in memento-0.3.7 vs spec/spec_helper.rb in memento-0.4.0
- old
+ new
@@ -24,61 +24,61 @@
t.column :notes, :text
t.references :customer
t.integer :ignore_this
t.timestamps
end
-
+
create_table :users do |t|
t.column :email, :string
t.column :name, :string
t.timestamps
end
-
+
create_table :customers do |t|
t.column :name, :string
t.timestamps
end
-
+
create_table :timestampless_objects do |t|
t.column :name, :string
end
-
+
create_table :memento_sessions do |t|
t.references :user
t.timestamps
end
-
+
create_table :memento_states do |t|
t.string :action_type
t.binary :record_data, :limit => 16777215
t.references :record, :polymorphic => true
t.references :session
t.timestamps
end
-
+
end
end
def setup_data
@user = User.create(:name => "MyUser")
end
-
+
def shutdown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
-
+
class User < ActiveRecord::Base
end unless defined?(User)
class Customer < ActiveRecord::Base
has_many :projects
end unless defined?(Customer)
class Project < ActiveRecord::Base
belongs_to :customer
-
+
memento_changes :ignore => :ignore_this
end unless defined?(Project)
class TimestamplessObject < ActiveRecord::Base
memento_changes
\ No newline at end of file