Method: RSpec::Matchers#be_an_instance_of

Defined in:
lib/rspec/matchers.rb

#be_an_instance_of(expected) ⇒ Object Also known as: be_instance_of, an_instance_of

Passes if actual.instance_of?(expected)

Examples:

expect(5).to     be_an_instance_of(Integer)
expect(5).not_to be_an_instance_of(Numeric)
expect(5).not_to be_an_instance_of(Float)


366
367
368
# File 'lib/rspec/matchers.rb', line 366

def be_an_instance_of(expected)
  BuiltIn::BeAnInstanceOf.new(expected)
end