spec/spec_helper.rb in binarylogic-searchlogic-2.1.9 vs spec/spec_helper.rb in binarylogic-searchlogic-2.1.10

- old
+ new

@@ -25,19 +25,33 @@ t.string :username t.string :name t.integer :age end + create_table :carts do |t| + t.datetime :created_at + t.datetime :updated_at + t.integer :user_id + end + create_table :orders do |t| t.datetime :created_at t.datetime :updated_at t.integer :user_id t.date :shipped_on t.float :taxes t.float :total end + create_table :fees do |t| + t.datetime :created_at + t.datetime :updated_at + t.string :owner_type + t.integer :owner_id + t.float :cost + end + create_table :line_items do |t| t.datetime :created_at t.datetime :updated_at t.integer :order_id t.float :price @@ -62,9 +76,13 @@ end class Order < ActiveRecord::Base belongs_to :user has_many :line_items, :dependent => :destroy + end + + class Fee < ActiveRecord::Base + belongs_to :owner, :polymorphic => true end class LineItem < ActiveRecord::Base belongs_to :order end