27 September 2013
Today I upgraded shoulda-matchers gem from version 1.4.2 to 2.4.0. shoulda-matchers is a bunch of one-liners to test Rails functionality and compatible with RSpec. My spec suite broken after the upgrade. This post is a walkthrough about the changes I had to make to fix my spec suite.
In version 1.4.2, I added these lines in
After upgrade, I got this error:
A quick peek at the source shows the error is right (because your know, error messages could lie to you), ActionMailer matchers not included in shoulda-matchers anymore. I can have the same functionalities in Mail itself. Read more from Using Mail with Testing or Spec’ing Libraries.
Now, I just need to replace
include Shoulda::Matchers::ActionMailer with
include Mail::Matchers. Because the matchers directly copied from shoulda-matchers, no further change needed.