Recommendations for managing tests for non-models and non-co

I’ve got unit tests for a class library that I’m using in a rails
project.
Currently this is the only project using this library so I would like to
keep the classes and tests in the rails project. I moved the classes
under
[app]/lib. I currently have the tests in [app]/test.

It would be great if these tests were run every time I run ‘rake’. What
is
everyone else doing for this?

-Kelly

On Jul 23, 2006, at 11:22 AM, Kelly F. wrote:

I’ve got unit tests for a class library that I’m using in a rails
project. Currently this is the only project using this library so I
would like to keep the classes and tests in the rails project. I
moved the classes under [app]/lib. I currently have the tests in
[app]/test.

It would be great if these tests were run every time I run ‘rake’.
What is everyone else doing for this?

I put my classes in ./lib and my tests in ./tests/unit. There’s no
reason why unit tests should be limited to stuff in ./app/models, as
far as I can see. :slight_smile:

Cheers,
Eric

Ah, good point.

I developed the lib using zentest/autotest, which places the test at the
beginning of the name of of the test – test_something.rb. Rails, or at
least the rake targets for testing seem to want it at the end –
something_test.rb. Once I changed the names ‘rake test:units’ found the
tests and ran them.

-Kelly

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs