If you're following Rails conventions, most of your business logic
probably lives in your models. I find model testing is the easiest
thing to test in Rails. And Hobo doesn't change this in any way. The
only thing you're missing is the generators: script/generate
rspec_scaffold generates rspec but not Hobo, and hobo_model_controller
generates Hobo but not rspec.
What I do is just generate rspec_model on a dummy model and then
convert it into a test for a Hobo model.
If I was starting a new project now, I'd probably use Test::Unit with
shoulda.
I tend not to do controller or view testing because there usually
isn't enough logic in them to make them worth the trouble.
If you create any non-trivial tag, it should be tested -- either with
a view test or an integration test. For examples of integration
tests, there is a simple Webrat based tests here:
http://github.com/tablatom/agility/blob/master/test/integration/filte....
There's a Selenium test here: http://github.com/tablatom/agility/blob/master/test/selenium/populate...
and there are more here: http://github.com/tablatom/agility/tree/jquery-test/test/selenium
cheers,
Bryan
On Apr 23, 7:57 am, adamski <adam.elemen...@gmail.com> wrote:
> Also interested in seeing how people test with Hobo, RSpec and
> otherwise. It is a highly neglected area of our project and we need to
> implement a lot more than our current unit tests.
> On Apr 23, 7:22 am, MartOn <frode.mel...@gmail.com> wrote:
> > Any1 using rspec with Hobo?
> > Would be nice to see how you a generating the rspec part of the code.
> > /MartOn