File tree 1 file changed +5
-4
lines changed
lib/active_model/serializer
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,14 @@ def test_read_attribute_for_serialization
38
38
assert_respond_to resource , :read_attribute_for_serialization , "The resource should respond to read_attribute_for_serialization"
39
39
actual_arity = resource . method ( :read_attribute_for_serialization ) . arity
40
40
if defined? ( ::Rubinius )
41
- # using 1 and 2 as values for rbx because :shrug:
42
- assert_includes [ 1 , 2 ] , actual_arity , "expected #{ actual_arity } to be 1 or 2"
41
+ # 1 for def read_attribute_for_serialization(name); end
42
+ # -2 for alias :read_attribute_for_serialization :send for rbx because :shrug:
43
+ assert_includes [ 1 , -2 ] , actual_arity , "expected #{ actual_arity . inspect } to be 1 or -2"
43
44
else
44
45
# using absolute value since arity is:
45
- # -1 for alias :read_attribute_for_serialization :send
46
46
# 1 for def read_attribute_for_serialization(name); end
47
- assert_equal actual_arity . abs , 1
47
+ # -1 for alias :read_attribute_for_serialization :send
48
+ assert_includes [ 1 , -1 ] , actual_arity , "expected #{ actual_arity . inspect } to be 1 or -1"
48
49
end
49
50
end
50
51
You can’t perform that action at this time.
0 commit comments