thoughtbot/shoulda-context

shoulda-context is now incompatible with shoulda-matchers 3.0

Closed this issue · 3 comments

I'll have a PR forthcoming, but for now:

shoulda-matchers 3.0 dropped support for RSpec 2 and removed negative_failure_message from all matcher classes in favor of failure_message_when_negated. Unfortunately, shoulda-context thinks that negative_failure_message still exists.

There are two ways to fix this:

a) Try to call failure_message_when_negated instead of negative_failure_message (would break backward compatibility with previous versions of shoulda-matchers)
b) Try to call failure_message_when_negated first, then negative_failure_message

Anyone have any opinions on this?

(Original issue: thoughtbot/shoulda-matchers#906)

Just to update folks: To fully finish this I need to update Shoulda and add more integration tests for RSpec 3 (specifically around negative assertions). I just recently converted the Cucumber tests in Shoulda to Minitest tests (borrowing some code from shoulda-matchers) so this should be a lot easier than before to do. I'm trying to work on this when I have time although help would certainly be appreciated.

For anyone checking in on this, this is the number one priority for this gem right now, but it depends on finishing the (known) Rails 5 issues for shoulda-matchers. Once that's done:

  • I'll release shoulda-matchers 4.0.0.rc1
  • Fix this gem so it's compatible with the RSpec 3 API change which shoulda-matchers abides by
  • Release shoulda-context 2.0.0.rc1
  • Release shoulda 4.0.0.rc1 that points to shoulda-context 2.0.0.rc1 and shoulda-matchers 4.0.0.rc1

This is fixed starting with shoulda-context 2.0.0.rc1, so I'm going to go ahead and close this.