thoughtbot/shoulda-matchers — pull request #110 by jmoline (2012-05-15 20:56:28+00:00)
Title: Adds matchers for attr_accessor, attr_reader, and attr_writer

This might generally be considered too basic to bother with, but it bugs me to add attr_* to a class without writing a test for it first. And adding respond_to? calls for every accessor generated method doesn't feel much better. I thought adding have_accessor, have_reader, and have_writer matchers made sense.

I know that the attr_* class methods are Ruby based and might not belong in Matchers::ActiveModel, but it seemed the most appropriate place to add them.

Let me know what you think.