Closed SirRawlins closed 9 years ago
Sounds to me like a spec is leaking state somewhere - the matchers in your case examine the return value of the private method _update_callbacks
on your model and then do some assertions on them. In your case, maybe putting a debugger into the statement here https://github.com/beatrichartz/shoulda-callback-matchers/blob/master/lib/shoulda/callback/matchers/active_model.rb#L67 and evaluating the assertions one by one will prove helpful.
Better failure messages with indications of partial failure would be helpful as well, I raised an issue for that.
Feel free to reopen if this proves to be a bug in the library.
@beatrichartz thanks for the suggestions. I'll take a closer looks at some point and try and pin down what's going on.
For some reason which I'm as yet unable to trace I'm getting intermittent failures in my tests which asset for the existence of a callback.
So for instance I have a spec which looks something like this:
Most of the time these specs will pass just fine, however on occasion they will fail, with the following error.
This seems to happen when running suites of specs rather than individual specs on their own, if that makes much difference to the situation?
This is using version 1.1.1, rspec 2.14 and rails 4.1
Any suggestions or ideas as to what might be causing this?