Permalink
Browse files

Squash warnings caused by test code

  • Loading branch information...
1 parent d3328c3 commit 3502b0f3fd127aee9133267104dfb2d5c1c0cd36 @lgierth lgierth committed with lgierth Dec 28, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 test/spec_builder.rb
  2. +1 −1 test/spec_chunked.rb
  3. +3 −3 test/spec_sendfile.rb
View
@@ -193,7 +193,7 @@ def config_file(name)
it "requires anything not ending in .ru" do
$: << File.dirname(__FILE__)
- app, options = Rack::Builder.parse_file 'builder/anything'
+ app, * = Rack::Builder.parse_file 'builder/anything'
Rack::MockRequest.new(app).get("/").body.to_s.should.equal 'OK'
$:.pop
end
View
@@ -42,7 +42,7 @@ def chunked(app)
response = Rack::MockResponse.new(*chunked(app).call(@env))
response.headers.should.not.include 'Content-Length'
response.headers['Transfer-Encoding'].should.equal 'chunked'
- response.body.encoding.to_s.should == "ASCII-8BIT"
+ response.body.encoding.to_s.should.equal "ASCII-8BIT"
response.body.should.equal "c\r\n\xFE\xFFH\x00e\x00l\x00l\x00o\x00\r\n2\r\n \x00\r\na\r\nW\x00o\x00r\x00l\x00d\x00\r\n0\r\n\r\n"
end if RUBY_VERSION >= "1.9"
View
@@ -43,7 +43,7 @@ def request(headers={})
request 'HTTP_X_SENDFILE_TYPE' => 'X-Sendfile' do |response|
response.should.be.ok
response.body.should.be.empty
- response.headers['Content-Length'].should == '0'
+ response.headers['Content-Length'].should.equal '0'
response.headers['X-Sendfile'].should.equal '/tmp/rack_sendfile'
end
end
@@ -52,7 +52,7 @@ def request(headers={})
request 'HTTP_X_SENDFILE_TYPE' => 'X-Lighttpd-Send-File' do |response|
response.should.be.ok
response.body.should.be.empty
- response.headers['Content-Length'].should == '0'
+ response.headers['Content-Length'].should.equal '0'
response.headers['X-Lighttpd-Send-File'].should.equal '/tmp/rack_sendfile'
end
end
@@ -65,7 +65,7 @@ def request(headers={})
request headers do |response|
response.should.be.ok
response.body.should.be.empty
- response.headers['Content-Length'].should == '0'
+ response.headers['Content-Length'].should.equal '0'
response.headers['X-Accel-Redirect'].should.equal '/foo/bar/rack_sendfile'
end
end

0 comments on commit 3502b0f

Please sign in to comment.