Created
April 25, 2009 07:02
-
-
Save Synesso/101537 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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