提交 6917c65f 编写于 作者: J José Valim

Merge pull request #2017 from Casecommons/active_record_lint

ActiveRecord::Base subclasses should pass ActiveModel::Lint.
......@@ -53,6 +53,16 @@ class Weird < ActiveRecord::Base; end
class Boolean < ActiveRecord::Base; end
class LintTest < ActiveRecord::TestCase
include ActiveModel::Lint::Tests
class LintModel < ActiveRecord::Base; end
def setup
@model = LintModel.new
end
end
class BasicsTest < ActiveRecord::TestCase
fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :categorizations, :categories, :posts
......
......@@ -305,6 +305,8 @@ def create_table(*args, &block)
t.references :student
end
create_table :lint_models, :force => true
create_table :line_items, :force => true do |t|
t.integer :invoice_id
t.integer :amount
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册