Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleanup tests for unused variables

  • Loading branch information...
commit 5da67065ad8bebe31e99c7df48c61f9623c57a5e 1 parent a210145
@vipulnsward vipulnsward authored
View
6 test/spec_builder.rb
@@ -180,8 +180,7 @@ def config_file(name)
end
it "removes __END__ before evaluating app" do
- app, options = Rack::Builder.parse_file config_file('end.ru')
- options = nil # ignored, prevents warning
+ app, _ = Rack::Builder.parse_file config_file('end.ru')
Rack::MockRequest.new(app).get("/").body.to_s.should.equal 'OK'
end
@@ -199,8 +198,7 @@ def config_file(name)
end
it "sets __LINE__ correctly" do
- app, options = Rack::Builder.parse_file config_file('line.ru')
- options = nil # ignored, prevents warning
+ app, _ = Rack::Builder.parse_file config_file('line.ru')
Rack::MockRequest.new(app).get("/").body.to_s.should.equal '1'
end
end
View
4 test/spec_session_cookie.rb
@@ -122,10 +122,10 @@ def response_for(options={})
end
it "warns if no secret is given" do
- cookie = Rack::Session::Cookie.new(incrementor)
+ Rack::Session::Cookie.new(incrementor)
@warnings.first.should =~ /no secret/i
@warnings.clear
- cookie = Rack::Session::Cookie.new(incrementor, :secret => 'abc')
+ Rack::Session::Cookie.new(incrementor, :secret => 'abc')
@warnings.should.be.empty?
end
View
2  test/spec_session_memcache.rb
@@ -274,7 +274,7 @@
session['counter'].should.equal 2 # meeeh
tnum = rand(7).to_i+5
- r = Array.new(tnum) do |i|
+ r = Array.new(tnum) do
app = Rack::Utils::Context.new pool, time_delta
req = Rack::MockRequest.new app
Thread.new(req) do |run|
Please sign in to comment.
Something went wrong with that request. Please try again.