bblimke/webmock — pull request #150 by tsaleh (2012-01-19 01:50:06+00:00)
Title: Fix #to_rack to handle non-array response bodies.

When using `#to_rack` with a Rails endpoint, such as:

``` ruby
stub_request(:any, %r{api.example.com/.*}).to_rack(Rails.application)
```

...you receive the following error:

```
NoMethodError: undefined method `join' for #
```

Turns out `ActionDispatch::Response` is in the right. A Rack response body
is only required to implement `#each`, not `#join`.

This patch fixes `#to_rack` to build the body using the `#each` method.