> - How easy/hard is to introduce rspec in the middle of development, I
> think you have to generate scaffolds with that enable isn't it? But I
> already have a base without them.
>

Sorry, can't help you there, since we implement testing from the
beginning.
Just setup an empty project and see, what files rspec generates.
They're just ruby code, so you can implement missing files where
necessary.

> - Is rspec a good choice to start with, specially since focus in on
> learning the framework and trying to implement the planned features?
>

We use rspec and are quite happy with it.
Learning it shouldn't be more difficult than learning the test
framework.


> I understand the importance of testing and I want to have it, just don't
> know where to start, the testing framework, the framework with some
> plugins, rspec, ...?
>

I would recommend rspec

> I would also appreciate some hints to make the process easier, for
> example: start by testing your controllers only, then move to something
> else later on, etc.
>

Yes, start with the controllers. They are the crucial point in your
app,
where I think the most errors happen.
Call every single action and make sure, that you get the expected
response,
that it renders the right thing or redirects to the right page.
Make sure, you get the right records and correct content in the
database
for all possible parameters.
Make sure, users have to be logged in and get redirected if they're
not.
Make sure, users can't access data of other users (Login as user A
and call a index or show function with the id of user B, make sure
that this
redirects or shows an empty page. Same goes (for example) for
making orders or payments by users.
Call form actions (create) with invalid data, make sure that generates
errors
and nothing goes into the database.

Next are the models. Test for working associations and validations.

Views are difficult to test, especially if you use Ajax.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to