instance method
assert_present
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v4.0.13Signature
assert_present(object)
Test if an expression is not blank. Passes if object.present? is true.
assert_present {:data => 'x' } # => true
Parameters
-
objectreq
Source
# File activesupport/lib/active_support/testing/assertions.rb, line 74
def assert_present(object)
assert object.present?, "#{object.inspect} is blank"
end
Defined in activesupport/lib/active_support/testing/assertions.rb line 74
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Testing::Assertions