Index: test/unit/product_test.rb =================================================================== --- test/unit/product_test.rb (revision 0) +++ test/unit/product_test.rb (revision 0) @@ -0,0 +1,6 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class ProductTest < Test::Unit::TestCase + load_all_fixtures + should_belong_to :business +end Index: test/rails_root/app/models/product.rb =================================================================== --- test/rails_root/app/models/product.rb (revision 0) +++ test/rails_root/app/models/product.rb (revision 0) @@ -0,0 +1,3 @@ +class Product < ActiveRecord::Base + belongs_to :business +end \ No newline at end of file Index: test/rails_root/app/models/business.rb =================================================================== --- test/rails_root/app/models/business.rb (revision 0) +++ test/rails_root/app/models/business.rb (revision 0) @@ -0,0 +1,3 @@ +class Business < ActiveRecord::Base + +end Index: test/rails_root/db/migrate/006_create_businesses.rb =================================================================== --- test/rails_root/db/migrate/006_create_businesses.rb (revision 0) +++ test/rails_root/db/migrate/006_create_businesses.rb (revision 0) @@ -0,0 +1,11 @@ +class CreateBusinesses < ActiveRecord::Migration + def self.up + create_table :businesses do |t| + t.column :name, :string + end + end + + def self.down + drop_table :businesses + end +end Index: test/rails_root/db/migrate/007_create_products.rb =================================================================== --- test/rails_root/db/migrate/007_create_products.rb (revision 0) +++ test/rails_root/db/migrate/007_create_products.rb (revision 0) @@ -0,0 +1,11 @@ +class CreateProducts < ActiveRecord::Migration + def self.up + create_table :products do |t| + t.column :business_id, :integer + end + end + + def self.down + drop_table :products + end +end