@@ -36,16 +36,10 @@ def test_serializable_hash
36
36
def test_read_attribute_for_serialization
37
37
assert_respond_to resource , :read_attribute_for_serialization , 'The resource should respond to read_attribute_for_serialization'
38
38
actual_arity = resource . method ( :read_attribute_for_serialization ) . arity
39
- if defined? ( ::Rubinius )
40
- # 1 for def read_attribute_for_serialization(name); end
41
- # -2 for alias :read_attribute_for_serialization :send for rbx because :shrug:
42
- assert_includes [ 1 , -2 ] , actual_arity , "expected #{ actual_arity . inspect } to be 1 or -2"
43
- else
44
- # using absolute value since arity is:
45
- # 1 for def read_attribute_for_serialization(name); end
46
- # -1 for alias :read_attribute_for_serialization :send
47
- assert_includes [ 1 , -1 ] , actual_arity , "expected #{ actual_arity . inspect } to be 1 or -1"
48
- end
39
+ # using absolute value since arity is:
40
+ # 1 for def read_attribute_for_serialization(name); end
41
+ # -1 for alias :read_attribute_for_serialization :send
42
+ assert_equal 1 , actual_arity . abs , "expected #{ actual_arity . inspect } .abs to be 1 or -1"
49
43
end
50
44
51
45
# Passes if the object responds to <tt>as_json</tt> and if it takes
@@ -85,8 +79,7 @@ def test_to_json
85
79
def test_cache_key
86
80
assert_respond_to resource , :cache_key
87
81
actual_arity = resource . method ( :cache_key ) . arity
88
- assert_includes [ -1 , 0 ] , actual_arity ,
89
- "expected #{ actual_arity . inspect } to be 0 or -1"
82
+ assert_includes [ -1 , 0 ] , actual_arity , "expected #{ actual_arity . inspect } to be 0 or -1"
90
83
end
91
84
92
85
# Passes if the object responds to <tt>updated_at</tt> and if it takes no
0 commit comments