rescue_each 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rescue_each.rb +1 -1
- data/test/rescue_each_test.rb +10 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/lib/rescue_each.rb
CHANGED
data/test/rescue_each_test.rb
CHANGED
@@ -66,6 +66,16 @@ class RescueEachTest < ActiveSupport::TestCase
|
|
66
66
|
assert_equal [[2],[4],[6],[8],[10]], error_object.errors.map(&:args)
|
67
67
|
end
|
68
68
|
|
69
|
+
test "error object contains args for Symbol#to_proc sugar" do
|
70
|
+
error_object = nil
|
71
|
+
begin
|
72
|
+
[42].rescue_each &:foo
|
73
|
+
rescue RescueEach::Error => e
|
74
|
+
error_object = e
|
75
|
+
end
|
76
|
+
assert_equal [[42]], error_object.errors.map(&:args)
|
77
|
+
end
|
78
|
+
|
69
79
|
def foo_abc
|
70
80
|
bar_def
|
71
81
|
end
|