Been doing some fooling around with scala for a little bit tonight, and specifically been trying out the BDD framework specs. specs adds some nice stuff to mockito that makes it read like a natural language… and I like it!
Take this simple example of stubbing:
list.get(0) returns "yo"
Yep… that’s perfectly valid scala code… and totally awesome.
Want to verify that a method was invoked with a specific argument?
notifier.send(order) was called
And again yes, that is a real line of code pulled from one of my examples. Take a look at more here.