Runtime assertions for Ruby literal.fun
ruby
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix tests

+18 -18
+9 -9
test/properties/reader.test.rb
··· 11 11 example: "hello", 12 12 ) 13 13 14 - refute_includes(object.public_methods, :example) 15 - refute_includes(object.protected_methods, :example) 16 - refute_includes(object.private_methods, :example) 14 + refute object.public_methods.include?(:example) 15 + refute object.protected_methods.include?(:example) 16 + refute object.private_methods.include?(:example) 17 17 end 18 18 19 19 test "false reader" do ··· 25 25 example: "hello", 26 26 ) 27 27 28 - refute_includes(object.public_methods, :example) 29 - refute_includes(object.protected_methods, :example) 30 - refute_includes(object.private_methods, :example) 28 + refute object.public_methods.include?(:example) 29 + refute object.protected_methods.include?(:example) 30 + refute object.private_methods.include?(:example) 31 31 end 32 32 33 33 test "private reader" do ··· 39 39 example: "hello", 40 40 ) 41 41 42 - assert_includes(object.private_methods, :example) 42 + assert object.private_methods.include?(:example) 43 43 assert_equal(object.__send__(:example), "hello") 44 44 end 45 45 ··· 52 52 example: "hello", 53 53 ) 54 54 55 - assert_includes(object.protected_methods, :example) 55 + assert object.protected_methods.include?(:example) 56 56 assert_equal(object.__send__(:example), "hello") 57 57 end 58 58 ··· 65 65 example: "hello", 66 66 ) 67 67 68 - assert_includes(object.public_methods, :example) 68 + assert object.public_methods.include?(:example) 69 69 assert_equal(object.example, "hello") 70 70 end
+9 -9
test/properties/writer.test.rb
··· 11 11 example: "hello", 12 12 ) 13 13 14 - refute_includes object.public_methods, :example= 15 - refute_includes object.protected_methods, :example= 16 - refute_includes object.private_methods, :example= 14 + refute object.public_methods.include?(:example=) 15 + refute object.protected_methods.include?(:example=) 16 + refute object.private_methods.include?(:example=) 17 17 end 18 18 19 19 test "false writer" do ··· 25 25 example: "hello", 26 26 ) 27 27 28 - refute_includes object.public_methods, :example 29 - refute_includes object.protected_methods, :example 30 - refute_includes object.private_methods, :example 28 + refute object.public_methods.include?(:example) 29 + refute object.protected_methods.include?(:example) 30 + refute object.private_methods.include?(:example) 31 31 end 32 32 33 33 test "private writer" do ··· 39 39 example: "hello", 40 40 ) 41 41 42 - assert_includes object.public_methods, :example 42 + assert object.public_methods.include?(:example) 43 43 assert_equal object.__send__(:example), "hello" 44 44 end 45 45 ··· 52 52 example: "hello", 53 53 ) 54 54 55 - assert_includes object.protected_methods, :example= 55 + assert object.protected_methods.include?(:example=) 56 56 assert_equal object.__send__(:example=, "world"), "world" 57 57 end 58 58 ··· 65 65 example: "hello", 66 66 ) 67 67 68 - assert_includes object.public_methods, :example= 68 + assert object.public_methods.include?(:example=) 69 69 assert_equal object.example = "world", "world" 70 70 end