Sha256: 2e387f97ab484df18980cacc9cfa05e0673bd3e07f81f161606d95ccd8295702

Contents?: true

Size: 564 Bytes

Versions: 4

Compression:

Stored size: 564 Bytes

Contents

covers 'facets/kernel/respond'

tests Kernel do

  unit :respond do
    c = Class.new do
      def f; "f"; end
    end
  
    x = c.new
    x.respond(:f).assert == "f"
    x.respond(:g).assert == nil

    x.respond.f.assert == "f"
    x.respond.g.assert == nil
  end

  #
  #unit :respond_with_value do
  #  c = Class.new do
  #    def f; "f"; end
  #  end
  #
  #  x = c.new
  #  x.respond_with_value(:f).assert == "f"
  #  x.respond_with_value(:g).assert == nil
  #
  #  x.respond_with_value.f.assert == "f"
  #  x.respond_with_value.g.assert == nil
  #end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/kernel/test_respond.rb
facets-2.9.0 test/core/kernel/test_respond.rb
facets-2.9.0.pre.2 test/core/kernel/test_respond.rb
facets-2.9.0.pre.1 test/core/kernel/test_respond.rb