summaryrefslogtreecommitdiff
path: root/test/spec_head.rb
diff options
context:
space:
mode:
authorRyan Davis <ryand-ruby@zenspider.com>2015-06-12 00:41:57 -0700
committerRyan Davis <ryand-ruby@zenspider.com>2015-06-12 00:41:57 -0700
commitc99a755a3f55f0769245e7a22dd000b471f77d88 (patch)
tree120f7686f5415a0a7789a38f00268fe80469ed81 /test/spec_head.rb
parentdf941b3cc45b15d544f3445e3bfcbdd9add362a6 (diff)
downloadrack-c99a755a3f55f0769245e7a22dd000b471f77d88.tar.gz
First attempt to mass-port from minitest/bacon to minitest/spec.
I still can't run some of the tests, so they might have problems. I'll leave it to the CI to catch them.
Diffstat (limited to 'test/spec_head.rb')
-rw-r--r--test/spec_head.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/spec_head.rb b/test/spec_head.rb
index 3d60da09..17b4a349 100644
--- a/test/spec_head.rb
+++ b/test/spec_head.rb
@@ -1,4 +1,4 @@
-require 'minitest/bacon'
+require 'minitest/autorun'
require 'rack/head'
require 'rack/lint'
require 'rack/mock'
@@ -16,31 +16,31 @@ describe Rack::Head do
return response, body
end
- should "pass GET, POST, PUT, DELETE, OPTIONS, TRACE requests" do
+ it "pass GET, POST, PUT, DELETE, OPTIONS, TRACE requests" do
%w[GET POST PUT DELETE OPTIONS TRACE].each do |type|
resp, _ = test_response("REQUEST_METHOD" => type)
- resp[0].should.equal(200)
- resp[1].should.equal({"Content-type" => "test/plain", "Content-length" => "3"})
- resp[2].to_enum.to_a.should.equal(["foo"])
+ resp[0].must_equal 200
+ resp[1].must_equal "Content-type" => "test/plain", "Content-length" => "3"
+ resp[2].to_enum.to_a.must_equal ["foo"]
end
end
- should "remove body from HEAD requests" do
+ it "remove body from HEAD requests" do
resp, _ = test_response("REQUEST_METHOD" => "HEAD")
- resp[0].should.equal(200)
- resp[1].should.equal({"Content-type" => "test/plain", "Content-length" => "3"})
- resp[2].to_enum.to_a.should.equal([])
+ resp[0].must_equal 200
+ resp[1].must_equal "Content-type" => "test/plain", "Content-length" => "3"
+ resp[2].to_enum.to_a.must_equal []
end
- should "close the body when it is removed" do
+ it "close the body when it is removed" do
resp, body = test_response("REQUEST_METHOD" => "HEAD")
- resp[0].should.equal(200)
- resp[1].should.equal({"Content-type" => "test/plain", "Content-length" => "3"})
- resp[2].to_enum.to_a.should.equal([])
- body.should.not.be.closed
+ resp[0].must_equal 200
+ resp[1].must_equal "Content-type" => "test/plain", "Content-length" => "3"
+ resp[2].to_enum.to_a.must_equal []
+ body.wont_be :closed?
resp[2].close
- body.should.be.closed
+ body.must_be :closed?
end
end