rspec/rspec-rails — pull request #589 by suweller (2012-08-03 15:24:58+00:00)
Title: Add have_callback matcher

This matcher allows testing of the existence of `ActiveModel::Callbacks` defined callbacks, without actually running the callback itself (which if all is well, is already fully tested in rails/rails).

```` ruby
it { should have_callback(:exit_batcave).before(:saving_the_day)
it { should have_callback(:punchline).after(:saving_the_day)
````

I've done my best to match the style of matchers currently in rspec-rails, but please let me know if additional changes are required before this will be merged.