aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-06-10 08:48:57 -0600
committerSean Griffin <sean@thoughtbot.com>2014-06-10 08:48:57 -0600
commit8a072fc07e5e486243e8a89db5a0add64013b72a (patch)
tree10b3dda8c93a2eafa6939338aa05e6d2c51839c6
parentbfb8b139aaeecd3aaadb99c3f483c1420e59c384 (diff)
downloadrails-8a072fc07e5e486243e8a89db5a0add64013b72a.tar.gz
rails-8a072fc07e5e486243e8a89db5a0add64013b72a.tar.bz2
rails-8a072fc07e5e486243e8a89db5a0add64013b72a.zip
Silence warnings in tests.
``` activerecord/test/cases/adapters/postgresql/range_test.rb:159: warning: (...) interpreted as grouped expression activerecord/test/cases/finder_test.rb:38: warning: shadowing outer local variable - e activerecord/test/cases/finder_test.rb:43: warning: shadowing outer local variable - e ```
-rw-r--r--activerecord/test/cases/adapters/postgresql/range_test.rb2
-rw-r--r--activerecord/test/cases/finder_test.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/range_test.rb b/activerecord/test/cases/adapters/postgresql/range_test.rb
index 4d9cfe55f5..0f6e39322c 100644
--- a/activerecord/test/cases/adapters/postgresql/range_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/range_test.rb
@@ -156,7 +156,7 @@ _SQL
assert_equal 0.5..0.7, @first_range.float_range
assert_equal 0.5...0.7, @second_range.float_range
assert_equal 0.5...Float::INFINITY, @third_range.float_range
- assert_equal (-Float::INFINITY...Float::INFINITY), @fourth_range.float_range
+ assert_equal(-Float::INFINITY...Float::INFINITY, @fourth_range.float_range)
assert_nil @empty_range.float_range
end
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index 0f52f2c0fc..bd77c412f6 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -34,10 +34,10 @@ class FinderTest < ActiveRecord::TestCase
end
def test_find_with_proc_parameter_and_block
- e = assert_raises(RuntimeError) do
+ exception = assert_raises(RuntimeError) do
Topic.all.find(-> { raise "should happen" }) { |e| e.title == "non-existing-title" }
end
- assert_equal "should happen", e.message
+ assert_equal "should happen", exception.message
assert_nothing_raised(RuntimeError) do
Topic.all.find(-> { raise "should not happen" }) { |e| e.title == topics(:first).title }