slagyr/speclj — pull request #74 by minostro (2014-01-13 03:44:42+00:00)
Title: should-invoke supports multiple expectations

This pull request is intended to extend the capabilities of should-invoke: now it's possible to define multiple expectations by using one definition of should-invoke. Using nested should-invoke does not work, that's the main reason of this pull request.

```clojure
(should-invoke println {}
(should-invoke str {}
(println (str "bla")))```

Here Speclj will complain because println never got executed, but clearly it got executed. The reason of this missbehavior or feature is because the use of `speclj.stub/*stubbed-invocations*`: each time you define a `should-invoke` this var get reset. To avoid this I have defined `should-invoke` to be able of receive multiple expectations on its definition, in the same way that `let`. The translated example by using the new syntax is as follows:

```clojure
(should-invoke [println {}
str {}]
(println (str "bla")))```

In our team we are using heavily this framework to test our apps and we will be very glad to have this kind of support on the `should-invoke` primitive. Please let me know any comment you have on this.