top | item 29848142

(no title)

montblanc | 4 years ago

I think tests should have caught that one but I agree.

discuss

order

henry700|4 years ago

Not if you follow the One True Way of Unit Testing (tm) where the Mongoid lib would have been mocked away, and the test would pass :)

Integration tests might've done the job here.

montblanc|4 years ago

You dont mock the db layer, i dont do that at least, hell no. Let the db be hit, check that the records it returns make sense. Thats how I roll at least.