Sha256: 6a4324a7b8a76518af72cf58fee27b6296aa738bcc2039414acf4afa22cc0e2c

Contents?: true

Size: 246 Bytes

Versions: 5

Compression:

Stored size: 246 Bytes

Contents

require "spec_helper"

describe 'Object' do
  after{remove_constants :Tmp}

  it "respond_to" do
    class Tmp
      def test; 2 end
    end

    o = Tmp.new
    o.respond_to(:not_exist).should be_nil
    o.respond_to(:test).should == 2
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby_ext-4.0.3 spec/core/object_spec.rb
ruby_ext-4.0.2 spec/core/object_spec.rb
ruby_ext-4.0.1 spec/core/object_spec.rb
ruby_ext-4.0.0 spec/core/object_spec.rb
ruby_ext-0.5.10 spec/core/object_spec.rb