Use assert_raises_regexp to check error messages