Permalink
Browse files

test for Rack::Response#close

  • Loading branch information...
rkh committed Jun 10, 2011
1 parent 41f085d commit fb3532e1319a7942f47311e3f1e327caaba4fe53
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/spec_response.rb
View
@@ -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

Please sign in to comment.