Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test for Rack::Response#close

  • Loading branch information...
commit fb3532e1319a7942f47311e3f1e327caaba4fe53 1 parent 41f085d
@rkh rkh authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/spec_response.rb
View
7 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
Please sign in to comment.
Something went wrong with that request. Please try again.