Skip to content

Instantly share code, notes, and snippets.

@arussel
Created July 8, 2012 06:42
Show Gist options
  • Save arussel/3069685 to your computer and use it in GitHub Desktop.
Save arussel/3069685 to your computer and use it in GitHub Desktop.
val http = mock[Http]
when(http.apply(any(manifest[Handler[Any]]))).thenReturn("foo bar", "foo bar")
@arussel
Copy link
Author

arussel commented Jul 8, 2012

Could not instantiate class FooSpec: java.lang.NullPointerException
dispatch.HttpExecutor$class.when(executor.scala:50)
dispatch.Http.when(Http.scala:21)
dispatch.HttpExecutor$class.apply(executor.scala:60)
dispatch.Http.apply(Http.scala:21)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment