Skip to content

Instantly share code, notes, and snippets.

@Synesso
Created April 25, 2009 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Synesso/101537 to your computer and use it in GitHub Desktop.
Save Synesso/101537 to your computer and use it in GitHub Desktop.
jem@fawkes:~/projects/specs-presentation$ scala -cp lib_managed/default/specs-1.4.4.jar:lib_managed/default/mockito-core-1.7.jar:lib_managed/default/h-core-1.1.jar:lib_managed/default/junit-4.4.jar
Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java 1.6.0_13).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import org.specs._
import org.specs._
scala> import org.specs.mock._
import org.specs.mock._
scala> object spec extends Specification with Mockito {
|
| val m = mock[java.util.List[String]] // a concrete class would be mocked with: mock(new java.util.LinkedList[String])
| m.get(anyInt()) returns "friedfish"
| }
<console>:11: error: not found: value anyInt
m.get(anyInt()) returns "friedfish"
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment