Permalink
Browse files
test for Rack::Response#close
- Loading branch information...
Showing
with
7 additions
and
0 deletions.
-
+7
−0
test/spec_response.rb
|
|
@@ -1,5 +1,6 @@ |
|
|
require 'set'
|
|
|
require 'rack/response'
|
|
|
+require 'stringio'
|
|
|
|
|
|
describe Rack::Response do
|
|
|
should "have sensible default values" do
|
|
@@ -243,4 +244,10 @@ |
|
|
res.headers["Content-Length"].should.equal "8"
|
|
|
end
|
|
|
|
|
|
+ it "calls close on #body" do
|
|
|
+ res = Rack::Response.new
|
|
|
+ res.body = StringIO.new
|
|
|
+ res.close
|
|
|
+ res.body.should.be.closed
|
|
|
+ end
|
|
|
end
|
0 comments on commit
fb3532e