aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/finder_test.rb
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 /activerecord/test/cases/finder_test.rb
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 ```
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r--activerecord/test/cases/finder_test.rb4
1 files changed, 2 insertions, 2 deletions
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 }