Sha256: e81fa8c43af62e23966f19ed98b27bacf624d4dbf4703f960c2b7390d5369c4d

Contents?: true

Size: 474 Bytes

Versions: 7

Compression:

Stored size: 474 Bytes

Contents

module RSpec
  module Matchers
    class BeAKindOf
      include BaseMatcher

      def matches?(actual)
        super(actual).kind_of?(expected)
      end
    end

    # Passes if actual.kind_of?(expected)
    #
    # @example
    #
    #   5.should be_kind_of(Fixnum)
    #   5.should be_kind_of(Numeric)
    #   5.should_not be_kind_of(Float)
    def be_a_kind_of(expected)
      BeAKindOf.new(expected)
    end
    
    alias_method :be_kind_of, :be_a_kind_of
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/rspec-expectations-2.8.0/lib/rspec/matchers/be_kind_of.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/rspec-expectations-2.8.0/lib/rspec/matchers/be_kind_of.rb
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-expectations-2.8.0/lib/rspec/matchers/be_kind_of.rb
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-expectations-2.8.0/lib/rspec/matchers/be_kind_of.rb
rspec-expectations-2.8.0 lib/rspec/matchers/be_kind_of.rb
rspec-expectations-2.8.0.rc2 lib/rspec/matchers/be_kind_of.rb
rspec-expectations-2.8.0.rc1 lib/rspec/matchers/be_kind_of.rb