1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

Signed-off-by: Joshua Peek <josh@joshpeek.com>
This commit is contained in:
lakshan 2009-09-21 09:49:43 -05:00 committed by Joshua Peek
parent 762d761673
commit e2d0b0ee61

View file

@ -2,7 +2,7 @@ require "test/unit"
require "test/unit/ui/console/testrunner" require "test/unit/ui/console/testrunner"
# You can test whether an object is compliant with the ActiveModel API by # 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, # output that tells you whether your object is fully compliant, or if not,
# which aspects of the API are not implemented. # which aspects of the API are not implemented.
# #
@ -13,7 +13,6 @@ require "test/unit/ui/console/testrunner"
# #
# Objects you pass in are expected to return a compliant object from a # 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. # call to to_model. It is perfectly fine for to_model to return self.
module ActiveModel module ActiveModel
module Lint module Lint
def self.test(object, verbosity = 2, output = STDOUT) def self.test(object, verbosity = 2, output = STDOUT)
@ -59,7 +58,7 @@ module ActiveModel
end end
def test_destroyed? 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? assert_boolean "destroyed?", @object.destroyed?
end end
@ -93,4 +92,4 @@ module ActiveModel
include Errors include Errors
end end
end end
end end