Skip to content

Instantly share code, notes, and snippets.

@Synesso
Created January 30, 2018 07:39
Show Gist options
  • Select an option

  • Save Synesso/6be9deaea044e7d53c828ac22578df8f to your computer and use it in GitHub Desktop.

Select an option

Save Synesso/6be9deaea044e7d53c828ac22578df8f to your computer and use it in GitHub Desktop.
// using json4s-native 3.6.0-M2
"bad json" should {
"not be parsed" >> {
val s = """{"foo":[{"bar":1},{"bar":2}{"bar":3}]}"""
parse(s) must throwAn[Exception]
}
}
/*
[info] bad json should
[error] x not be parsed
[error] Expected: java.lang.Exception. Got nothing (JsonSpec.scala:10)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment