Permalink
Browse files

Cleanup unused variables

  • Loading branch information...
1 parent 54d6ba0 commit ef2c38955ec86cdbd14eff821de23c7e9a03a88e @vipulnsward vipulnsward committed Mar 14, 2013
Showing with 7 additions and 7 deletions.
  1. +1 −1 test/integration_helper.rb
  2. +1 −1 test/request_test.rb
  3. +5 −5 test/streaming_test.rb
@@ -60,7 +60,7 @@ def ping(timeout = 30)
def alive?
3.times { get('/ping') }
true
- rescue Errno::ECONNREFUSED, Errno::ECONNRESET, EOFError, SystemCallError, OpenURI::HTTPError, Timeout::Error => error
+ rescue Errno::ECONNREFUSED, Errno::ECONNRESET, EOFError, SystemCallError, OpenURI::HTTPError, Timeout::Error
false
end
View
@@ -38,7 +38,7 @@ class RequestTest < Test::Unit::TestCase
'CONTENT_TYPE' => 'application/x-www-form-urlencoded',
'rack.input' => StringIO.new('foo=bar')
)
- params = Sinatra::Base.new!.send(:indifferent_hash).replace(request.params)
+ Sinatra::Base.new!.send(:indifferent_hash).replace(request.params)
dumped = Marshal.dump(request.params)
assert_equal 'bar', Marshal.load(dumped)['foo']
end
View
@@ -41,9 +41,9 @@ class StreamingTest < Test::Unit::TestCase
it 'calls the callback after it is done' do
step = 0
final = 0
- stream = Stream.new { |o| 10.times { step += 1 }}
+ stream = Stream.new { 10.times { step += 1 }}
stream.callback { final = step }
- stream.each { |str| }
+ stream.each { }
assert_equal 10, final
end
@@ -52,7 +52,7 @@ class StreamingTest < Test::Unit::TestCase
final = 0
stream = Stream.new(Stream, :keep_open) { |o| 10.times { step += 1 } }
stream.callback { final = step }
- stream.each { |str| }
+ stream.each { }
assert_equal 0, final
end
@@ -61,7 +61,7 @@ class StreamingTest < Test::Unit::TestCase
stream = Stream.new { }
stream.callback { a = true }
stream.callback { b = true }
- stream.each { |str| }
+ stream.each { }
assert a, 'should trigger first callback'
assert b, 'should trigger second callback'
end
@@ -110,7 +110,7 @@ def defer!(*) @defer.pop.call until @defer.empty? end
it 'does not trigger an infinite loop if you call close in a callback' do
stream = Stream.new { |out| out.callback { out.close }}
- stream.each { |str| }
+ stream.each { }
end
it 'gives access to route specific params' do

0 comments on commit ef2c389

Please sign in to comment.