Sha256: 0cbe9bba9fcc399a0e5d21c228798707f9e462fa93bcc3eb00198c0e4b89a888

Contents?: true

Size: 434 Bytes

Versions: 1

Compression:

Stored size: 434 Bytes

Contents

require 'abstract_unit'
require 'active_support/core_ext/object/metaclass'
require 'active_support/core_ext/object/conversions'

class ObjectExtTest < Test::Unit::TestCase
  def test_tap_yields_and_returns_self
    foo = Object.new
    assert_equal foo, foo.tap { |x| assert_equal foo, x; :bar }
  end

  def test_to_param
    foo = Object.new
    foo.class_eval("def to_s; 'foo'; end")
    assert_equal 'foo', foo.to_param
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
recliner-0.0.1 vendor/activesupport/test/core_ext/object_ext_test.rb