Skip to content

Commit

Permalink
Cleanup unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnsward committed Mar 14, 2013
1 parent 54d6ba0 commit ef2c389
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/integration_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def ping(timeout = 30)
def alive? def alive?
3.times { get('/ping') } 3.times { get('/ping') }
true 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 false
end end


Expand Down
2 changes: 1 addition & 1 deletion test/request_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class RequestTest < Test::Unit::TestCase
'CONTENT_TYPE' => 'application/x-www-form-urlencoded', 'CONTENT_TYPE' => 'application/x-www-form-urlencoded',
'rack.input' => StringIO.new('foo=bar') '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) dumped = Marshal.dump(request.params)
assert_equal 'bar', Marshal.load(dumped)['foo'] assert_equal 'bar', Marshal.load(dumped)['foo']
end end
Expand Down
10 changes: 5 additions & 5 deletions test/streaming_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class StreamingTest < Test::Unit::TestCase
it 'calls the callback after it is done' do it 'calls the callback after it is done' do
step = 0 step = 0
final = 0 final = 0
stream = Stream.new { |o| 10.times { step += 1 }} stream = Stream.new { 10.times { step += 1 }}
stream.callback { final = step } stream.callback { final = step }
stream.each { |str| } stream.each { }
assert_equal 10, final assert_equal 10, final
end end


Expand All @@ -52,7 +52,7 @@ class StreamingTest < Test::Unit::TestCase
final = 0 final = 0
stream = Stream.new(Stream, :keep_open) { |o| 10.times { step += 1 } } stream = Stream.new(Stream, :keep_open) { |o| 10.times { step += 1 } }
stream.callback { final = step } stream.callback { final = step }
stream.each { |str| } stream.each { }
assert_equal 0, final assert_equal 0, final
end end


Expand All @@ -61,7 +61,7 @@ class StreamingTest < Test::Unit::TestCase
stream = Stream.new { } stream = Stream.new { }
stream.callback { a = true } stream.callback { a = true }
stream.callback { b = true } stream.callback { b = true }
stream.each { |str| } stream.each { }
assert a, 'should trigger first callback' assert a, 'should trigger first callback'
assert b, 'should trigger second callback' assert b, 'should trigger second callback'
end end
Expand Down Expand Up @@ -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 it 'does not trigger an infinite loop if you call close in a callback' do
stream = Stream.new { |out| out.callback { out.close }} stream = Stream.new { |out| out.callback { out.close }}
stream.each { |str| } stream.each { }
end end


it 'gives access to route specific params' do it 'gives access to route specific params' do
Expand Down

0 comments on commit ef2c389

Please sign in to comment.