Rack::Response - why not enumerable?

4 views
Skip to first unread message

matt mitchell

unread,
Jun 13, 2008, 8:09:39 AM6/13/08
to Rack Development
Hi,

Just wondering why Rack::Response isn't enumerable? For example, I'd
like to be able to:

status,headers,body = @app.call(new_rack_env)
body.collect.should == ['A GET request for /']

Matt

p.s. thanks for creating such an awesome project!

Christian Neukirchen

unread,
Jun 13, 2008, 10:51:23 AM6/13/08
to rack-...@googlegroups.com
matt mitchell <good...@gmail.com> writes:

> Hi,
>
> Just wondering why Rack::Response isn't enumerable? For example, I'd
> like to be able to:
>
> status,headers,body = @app.call(new_rack_env)
> body.collect.should == ['A GET request for /']
>
> Matt

Could be useful for this case, but in general bodies aren't.
Maybe you want to use MockRequest for testing?

> p.s. thanks for creating such an awesome project!

Thanks.
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org

Reply all
Reply to author
Forward
0 new messages