提交 e2d0b0ee 编写于 作者: L lakshan 提交者: Joshua Peek

fixed ActiveModel::Lint typos [#3236 state:resolved]

Signed-off-by: NJoshua Peek <josh@joshpeek.com>
上级 762d7616
......@@ -2,7 +2,7 @@
require "test/unit/ui/console/testrunner"
# You can test whether an object is compliant with the ActiveModel API by
# calling ActiveModel::Compliance.test(object). It will emit a Test::Unit
# calling ActiveModel::Lint.test(object). It will emit a Test::Unit
# output that tells you whether your object is fully compliant, or if not,
# which aspects of the API are not implemented.
#
......@@ -13,7 +13,6 @@
#
# Objects you pass in are expected to return a compliant object from a
# call to to_model. It is perfectly fine for to_model to return self.
module ActiveModel
module Lint
def self.test(object, verbosity = 2, output = STDOUT)
......@@ -59,7 +58,7 @@ def test_new_record?
end
def test_destroyed?
assert @object.respond_to?(:new_record?), "The model should respond to destroyed?"
assert @object.respond_to?(:destroyed?), "The model should respond to destroyed?"
assert_boolean "destroyed?", @object.destroyed?
end
......@@ -93,4 +92,4 @@ def test_errors_full_messages
include Errors
end
end
end
\ No newline at end of file
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册