Module: ShouldaExt::Assertions
- Included in:
- Test::Unit::TestCase
- Defined in:
- lib/shoulda_ext/assertions.rb
Instance Method Summary collapse
-
#assert_blank(object, message = nil) ⇒ Object
Asserts the result of object.blank?.
-
#assert_not_blank(object, message = nil) ⇒ Object
Asserts the result of !object.blank?.
Instance Method Details
#assert_blank(object, message = nil) ⇒ Object
Asserts the result of object.blank?
5 6 7 |
# File 'lib/shoulda_ext/assertions.rb', line 5 def assert_blank(object, = nil) assert(object.blank?, || "Expected object to be blank") end |
#assert_not_blank(object, message = nil) ⇒ Object
Asserts the result of !object.blank?
10 11 12 |
# File 'lib/shoulda_ext/assertions.rb', line 10 def assert_not_blank(object, = nil) assert(!object.blank?, || "Expected object to not be blank") end |