Have you considered using the be_instance_of rspec matcher?