Updated tests using Midje mocks.

Original tests are kind of confusing and every test case is strongly coupled with the implementation. Now that we already use Midje, we could improving the use of mocking a little bit.
Merge pull request #237 from luckykevin/patch-1

Updated tests using Midje mocks.