Permalink
Browse files

cleanup tests for unused variables

  • Loading branch information...
vipulnsward committed Apr 13, 2013
1 parent a210145 commit 5da67065ad8bebe31e99c7df48c61f9623c57a5e
Showing with 5 additions and 7 deletions.
  1. +2 −4 test/spec_builder.rb
  2. +2 −2 test/spec_session_cookie.rb
  3. +1 −1 test/spec_session_memcache.rb
View
@@ -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
@@ -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
@@ -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|

0 comments on commit 5da6706

Please sign in to comment.