It’s because you can’t use something like this:
assert_equal { :one => "eins", :two => "dos" }, hash
Ruby thinks that { ... } is a block, so it should be “broken out into a variable”, but you can always use assert_equal({ :one => "eins", :two => "dos" }, hash)