Sha256: 1890179160a4bc1dd17e907ad58c93e7cac77e9b3ec75d427321a76ef50cba87
Contents?: true
Size: 626 Bytes
Versions: 147
Compression:
Stored size: 626 Bytes
Contents
require 'test_helper' require 'tins/xt' module Tins class RespondingTest < Test::Unit::TestCase class A def foo() end def bar() end end def test_responding assert_equal true, responding?(:foo) === A.new assert_equal false, responding?(:jflafjdklfjaslkdfj) === A.new assert_equal false, responding?(:jflafjdklfjaslkdfj, :foo) === A.new assert_equal true, responding?(:foo, :bar) === A.new end def test_responding_to_s assert_equal 'Responding to foo', responding?(:foo).to_s assert_equal 'Responding to foo', responding?(:foo).inspect end end end
Version data entries
147 entries across 129 versions & 9 rubygems