From e1d4e78b15141cf940be7a84ca856425484a98be Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Fri, 23 Jul 2010 00:36:34 -0300 Subject: Removes unused vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activesupport/test/caching_test.rb | 2 +- activesupport/test/core_ext/module_test.rb | 2 +- activesupport/test/dependencies_test.rb | 2 -- activesupport/test/json/encoding_test.rb | 2 +- activesupport/test/memoizable_test.rb | 1 - activesupport/test/multibyte_chars_test.rb | 2 +- activesupport/test/ordered_hash_test.rb | 2 +- activesupport/test/test_test.rb | 2 +- 8 files changed, 6 insertions(+), 9 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index 3e14c754b7..212c1f82a8 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -279,7 +279,7 @@ module CacheStoreBehavior assert_equal 'bar', @cache.read('foo') raise ArgumentError.new end - rescue ArgumentError => e + rescue ArgumentError end assert_equal "bar", @cache.read('foo') Time.stubs(:now).returns(time + 71) diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb index 39ee0ac748..5d9cdf22c2 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -147,7 +147,7 @@ class ModuleTest < Test::Unit::TestCase end assert_nothing_raised do - child = Class.new(parent) do + Class.new(parent) do class << self delegate :parent_method, :to => :superclass end diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 4b8c7897b7..d7bde185bd 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -419,7 +419,6 @@ class DependenciesTest < Test::Unit::TestCase def test_removal_from_tree_should_be_detected with_loading 'dependencies' do - root = ActiveSupport::Dependencies.autoload_paths.first c = ServiceOne ActiveSupport::Dependencies.clear assert ! defined?(ServiceOne) @@ -434,7 +433,6 @@ class DependenciesTest < Test::Unit::TestCase def test_references_should_work with_loading 'dependencies' do - root = ActiveSupport::Dependencies.autoload_paths.first c = ActiveSupport::Dependencies.ref("ServiceOne") service_one_first = ServiceOne assert_equal service_one_first, c.get diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index a679efb41e..1527d02d16 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -148,7 +148,7 @@ class TestJSONEncoding < Test::Unit::TestCase :latitude => 123.234 } } - result = ActiveSupport::JSON.encode(hash) + ActiveSupport::JSON.encode(hash) end end diff --git a/activesupport/test/memoizable_test.rb b/activesupport/test/memoizable_test.rb index 195e3eaa42..b11fa8d346 100644 --- a/activesupport/test/memoizable_test.rb +++ b/activesupport/test/memoizable_test.rb @@ -134,7 +134,6 @@ class MemoizableTest < ActiveSupport::TestCase end def test_reloadable - counter = @calculator.counter assert_equal 1, @calculator.counter assert_equal 2, @calculator.counter(:reload) assert_equal 2, @calculator.counter diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb index 78232d8eb5..6ebbfdf334 100644 --- a/activesupport/test/multibyte_chars_test.rb +++ b/activesupport/test/multibyte_chars_test.rb @@ -234,7 +234,7 @@ class MultibyteCharsUTF8BehaviourTest < Test::Unit::TestCase def test_include_raises_when_nil_is_passed @chars.include?(nil) flunk "Expected chars.include?(nil) to raise TypeError or NoMethodError" - rescue Exception => e + rescue Exception end def test_index_should_return_character_offset diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb index d340bed444..f47e896487 100644 --- a/activesupport/test/ordered_hash_test.rb +++ b/activesupport/test/ordered_hash_test.rb @@ -214,7 +214,7 @@ class OrderedHashTest < Test::Unit::TestCase def test_alternate_initialization_raises_exception_on_odd_length_args begin - alternate = ActiveSupport::OrderedHash[1,2,3,4,5] + ActiveSupport::OrderedHash[1,2,3,4,5] flunk "Hash::[] should have raised an exception on initialization " + "with an odd number of parameters" rescue diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index 3092fe01ae..633d3b212b 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -49,8 +49,8 @@ class AssertDifferenceTest < ActiveSupport::TestCase end def test_expression_is_evaluated_in_the_appropriate_scope - local_scope = 'foo' silence_warnings do + local_scope = 'foo' assert_difference('local_scope; @object.num') { @object.increment } end end -- cgit v1.2.3