thoughtbot / shoulda-context

Shoulda Context makes it easy to write understandable and maintainable tests under Minitest and Test::Unit within Rails projects or plain Ruby projects.
MIT License
239 stars 58 forks source link

shoulda-context is now incompatible with shoulda-matchers 3.0 #53

Closed mcmire closed 5 years ago

mcmire commented 8 years ago

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: https://github.com/thoughtbot/shoulda-matchers/issues/906)

mcmire commented 7 years ago

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.

mcmire commented 6 years ago

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:

mcmire commented 5 years ago

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