Should we explicitly test the resource, or should it just be included in the controller tests?
@lcpriest our team has been using rspec request specs to test resources.
@lcpriest I've found that request specs are the most useful. I have some very large resource classes and recommend that if you have any nontrivial logic in there that you think deserves some unit tests that you extracted it into testable modules that can be called from the resource getters.
The airborne gem is pretty useful for matching against JSON responses. I'd be curious to hear as well who has had success testing resources calling the serializer directly.
Thanks!
Most helpful comment
@lcpriest our team has been using rspec request specs to test resources.