views:

227

answers:

3

I've got some code in the lib/ directory that don't really belong under controls, models or helpers. I'd like to write some rspec tests for this code, but am not sure where they should go under the spec/ directory. Is there a convention that's commonly followed?

+3  A: 

Same situation here. I use spec/lib.

Rich Apodaca
+4  A: 

I would use a subdirectory of /spec as well. However, I would consider refactoring the code into a separate plugin or gem if it is really separate and can be tested standalone. In this plugin, you can create a separate spec-directory.

wvb
+1  A: 

we use spec/lib too

grosser