Sha256: 16e5f953ea3643bc8eeb654201387b151faa319a1b14d07ae0f9f9e530b82b53

Contents?: true

Size: 537 Bytes

Versions: 10

Compression:

Stored size: 537 Bytes

Contents

#!/usr/bin/env ruby

require 'test/test_setup'
require 'flexmock/object_extensions'

class ObjectExtensionsTest < Test::Unit::TestCase
  def setup
    @obj = Object.new
    def @obj.smethod
      :ok
    end
  end

  def test_undefined_methods_are_not_singletons
    assert ! @obj.flexmock_singleton_defined?(:xyzzy)
  end

  def test_normal_methods_are_not_singletons
    assert ! @obj.flexmock_singleton_defined?(:to_s)
  end

  def test_singleton_methods_are_singletons
    assert @obj.flexmock_singleton_defined?(:smethod)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flexmock-1.3.3 test/object_extensions_test.rb
flexmock-1.3.2 test/object_extensions_test.rb
flexmock-1.3.1 test/object_extensions_test.rb
flexmock-1.3.0 test/object_extensions_test.rb
flexmock-1.2.0 test/object_extensions_test.rb
flexmock-1.1.0 test/object_extensions_test.rb
flexmock-1.0.4 test/object_extensions_test.rb
flexmock-1.0.3 test/object_extensions_test.rb
flexmock-1.0.2 test/object_extensions_test.rb
flexmock-1.0.1 test/object_extensions_test.rb