tenderlove/texticle — Issue #64: Clean Up Tests
Author: benhamill
Created: 2012-01-19 21:24:56+00:00
State: open

@ecin said, in a pull request comment:

> The [test] code probably could use cleanup; our texticle_spec.rb file is certainly looking too long.

So I thought I'd start a discussion about it. I'm willing to do the work, but don't want to go off in a random direction no one would find useful. If it were just me, I'd actually use RSpec and rewrite everything with that. I understand not everyone's a big fan of that, so I'm not going to push it too hard, but I thought I'd at least mention it. I like the colored output and the fact that it'll traverse directory structures for you.

Also, we have these model classes that we're reusing in various places and including modules or extending them, etc. And once something's included in a class as long as the class is still in memory (the whole test suite), that module will always be included, so all tests that follow will not really be in isolation... they'll be with that module included. That seems a bit dangerous.

Then there's the question of how tests should be organized. There's not a lot of code in this gem, but when I first started writing pull requests, it wasn't clear to me where I should be adding tests for the functionality I was adding, so maybe we should break things up some more and rearrange it. I'm just not sure how.

Anyone, of course, is welcome to pipe up. In particular, though, it'd be nice to hear from the folks with commit access to the repo. :smile: