redding/and-son — pull request #27 by jcredding (2014-03-10 15:55:37+00:00)
Title: Update stored responses to call blcok when the service is called

This updates the stored responses to delay calling the response
block till when the service is called. This allows testing that
a service is or isn't called by a piece of code. Previously, the
block would be called when the stored response was added. This
meant that it couldn't easily be tested if a service was called
or not. The response of the service needed to be saved off in the
thing calling it and then that should be checked to make sure it
was set or not. Now, a flag can be set in the respone block and
then a test can ensure it is set or not.

This also cleans up the test suite from using the name `BaseTests`
to `UnitTests`. This is a more clear and expressive naming.

@kellyredding - Ready for review. This is needed for some testing I'm doing. I essentially want to do:

```ruby
client = AndSon.new(...)
service_called = false
client.responses.add('my_service', { ... }){ service_called = true }
assert_false service_called
client.call('my_service', { ... })
assert_true service_called
```

I don't care what the response is, I only want to ensure that a set of code runs the service I expect.