Reputation: 26973
In a rails unit test using Minitest, with the following code:
def test_notification
# ("Arrange" stuff here...)
get root_path
assert_predicate flash, blank?
end
When run, the assert_predicate
line causes the error:
Minitest::UnexpectedError: TypeError: false is not a symbol nor a string
What's going on here?
Upvotes: 0
Views: 278
Reputation: 26973
The problem is that blank?
needs to be a symbol -- it's missing the leading :
in the snippet above. The corrected code:
def test_notification
# ("Arrange" stuff here...)
get root_path
assert_predicate flash, :blank?
end
Upvotes: 1