disabling MetaWhere feature and making Acitve Record fixture that is always loaded

This commit is contained in:
Ryan Bates
2012-04-22 16:06:59 -07:00
parent 8c72ab40a4
commit 1ff1b70de4
7 changed files with 46 additions and 61 deletions

37
spec/fixtures/active_record.rb vendored Normal file
View File

@@ -0,0 +1,37 @@
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
class Category < ActiveRecord::Base
connection.create_table(table_name) do |t|
t.boolean :visible
end
has_many :articles
has_many :projects
end
class Project < ActiveRecord::Base
connection.create_table(table_name) do |t|
t.integer :category_id
t.string :name
end
belongs_to :category
end
class Article < ActiveRecord::Base
connection.create_table(table_name) do |t|
t.integer :category_id
t.string :name
t.boolean :published
t.boolean :secret
t.integer :priority
end
belongs_to :category
has_many :comments
end
class Comment < ActiveRecord::Base
connection.create_table(table_name) do |t|
t.integer :article_id
t.boolean :spam
end
belongs_to :article
end

0
spec/fixtures/data_mapper.rb vendored Normal file
View File

0
spec/fixtures/mongoid.rb vendored Normal file
View File