@@ -36,16 +36,10 @@ def test_serializable_hash
3636 def test_read_attribute_for_serialization
3737 assert_respond_to resource , :read_attribute_for_serialization , 'The resource should respond to read_attribute_for_serialization'
3838 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"
4943 end
5044
5145 # Passes if the object responds to <tt>as_json</tt> and if it takes
@@ -85,8 +79,7 @@ def test_to_json
8579 def test_cache_key
8680 assert_respond_to resource , :cache_key
8781 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"
9083 end
9184
9285 # Passes if the object responds to <tt>updated_at</tt> and if it takes no
0 commit comments