Sha256: ee7bd6e6ac0fbb4f163dc10f6eae346980f0540148a09205fd0c06bb2ec98052
Contents?: true
Size: 692 Bytes
Versions: 2
Compression:
Stored size: 692 Bytes
Contents
module Spec module Matchers # :call-seq: # should be_instance_of(expected) # should be_an_instance_of(expected) # should_not be_instance_of(expected) # should_not be_an_instance_of(expected) # # Passes if actual.instance_of?(expected) # # == Examples # # 5.should be_instance_of(Fixnum) # 5.should_not be_instance_of(Numeric) # 5.should_not be_instance_of(Float) def be_an_instance_of(expected) Matcher.new :be_an_instance_of, expected do |expected| match do |actual| actual.instance_of?(expected) end end end alias_method :be_instance_of, :be_an_instance_of end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec-1.2.3 | lib/spec/matchers/be_instance_of.rb |
rspec-1.2.4 | lib/spec/matchers/be_instance_of.rb |