Fix error message assertions in JRuby tests

`assert_failure` only accepts an expected message as argument, and only
if it matches the output in full.
Ensure that `assert_output_contains` receives an argument