module ActiveSupport::Testing::Assertions

def assert_present(object, message=nil)

assert_present({ data: 'x' }, 'this should not be blank')

An error message can be specified.

assert_present({}) # => {} is blank
assert_present({ data: 'x' }) # => true

is +true+.
Test if an expression is not blank. Passes if object.present?
def assert_present(object, message=nil)
  ActiveSupport::Deprecation.warn('"assert_present" is deprecated. Please use "assert object.present?" instead')
  message ||= "#{object.inspect} is blank"
  assert object.present?, message
end