joshmcarthur/spree-import-products — Issue #12: Adding Tests
Author: joshmcarthur
Created: 2011-12-14 04:06:20+00:00
State: open

Hi everyone,

I'm adding this issue to ask if anyone is able to help me out to get spree-import-products covered by specs. I've spent the last few weeks trying to get my head around the best way to do the following things:

1. Testing for multiple versions of Spree: I'm keen to maintain backwards compatibility with Spree, ideally back to the version for which I built this extension (0.30, I believe). The challenges I've faced here include architecting the extension to work with different versions, and, in particular, how to generate some sort of test app that I can test the extension with. Spree's generators for test apps seem to have changed over versions, so it's not a simple command I can run, and different versions seem to have different requirements of the extension.
2. Writing concise, useful specs that cover the majority of the code base: while I've written RSpec specs before on more than one occasion, I've not yet managed to write specs for an application that I'm happy with in terms of conciseness and usefulness.

So far, I've had a nice strategy suggested to me to use a Versionfile to manage backwards compatibility. This would involve having a branch dedicated to each version of Spree that should be supported. This simplifies generating sandbox Spree apps for running specs against, and code that is specific to one or more versions (Such as deface support).

I would appreciate any offers to either try and get a testing infrastructure set up that myself and others can run specs against, to add specs yourself, to help me out, or generally to offer opinions and advice. I'll continue to monitor and feedback on this issue as I carry on trying to get a testing infrastructure in place.