On 19 Jul 2013, at 20:02, Graham Ashton <[email protected]> wrote:
> Having just said that functional tests are like mini integeration tests for > the controller/view interaction, they often give me a similar sized step into > the unknown as a unit test. I use them to TDD my controller/view combination, > and as such they feel very much like unit tests. I think your approach and mine are similar but at the same time mentally a little different because I tend to prefer BDD. I'm going to write a Cucumber test describing the behaviour and then dive down into RSpec to test the internals of my objects. So in this case I'd write a test describing the CSV export and the email being sent and then end up with the same thing, but with clearly distinct specs that test the same thing your smaller unit tests do. That's obviously going to achieve something similar to your approach in terms of coverage and documenting developer intent. It is perhaps my better familiarity with Cucumber/RSpec and the years that have passed since I last used TestUnit in anger that caused me to make a tit of myself and show I had forgotten TestUnit isn't just for model unit tests and can be used for functional tests as you describe. Sorry. :-) Anyway, let's not do a TDD vs BDD debate. It's Friday night, we should all be drunk by now. :-) -- 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.
