I've not read it myself, but I've heard good things about this book:

http://pragprog.com/book/nrtest/rails-test-prescriptions



On 18 Jul 2013, at 12:57, Ian Moss <[email protected]> wrote:

> Cheers Tekin. I'll see if I can find an example for that after lunch.
> 
> For everyone, give that testing is often quite tricky, what do you find
> the best source of examples of tests outside your own codebase? Maybe
> this is something that we as a local community can improve?
> 
>> Could you not write a functional (controller) test that makes the request
>> to the action and inspects the response body and header to see that they
>> are what you expect?
>> 
>>> Given that the ActiveAdmin 'controller' method 'export' exports a csv
>>> and it has been called in a http request,
>>> And I'm using TestUnit
>>> As A Developer, I want to assert that the file 'export.txt' is created
>>> and sent as a http response
>>> 
>>> I guess it must create a tmp file somewhere, but I've not found that to
>>> be the case yet.
>>> 
>>> For reference: http://www.activeadmin.info/docs/4-csv-format.html
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "NWRUG" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/nwrug-members.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"NWRUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nwrug-members.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to