rspec/rspec-expectations — pull request #184 by mortice (2012-10-23 15:58:03+00:00)
Title: Fix generated docstring when Class#inspect changed

This fixes the situation illustrated in @ddd's gist https://gist.github.com/13469eb6a970e48ec1dc and reported in #rspec on Freenode, whereby a class defines #inspect with expanded information (e.g. all ActiveRecord model classes) and messes up docstring generation.

BeAnInstanceOf doesn't currently define its own #description method, so the default from BaseMatcher, which calls #inspect, was being called. This PR just patches in a description method to the matcher to ensure that to_s is called instead.