Module: ShouldaExt::Assertions

Included in:
Test::Unit::TestCase
Defined in:
lib/shoulda_ext/assertions.rb

Instance Method Summary collapse

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, message = nil)
  assert(object.blank?, message || "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, message = nil)
  assert(!object.blank?, message || "Expected object to not be blank")
end