David Beckwith
2008-Feb-29 23:33 UTC
[rspec-users] outside-in = integration tests on views?
Hi, In the spirit of "outside-in" are given-when-then scenarios supposed to be integration tests of views? Or should we be accessing the model interfaces directly (not through a view)? Thanks, David :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080229/dc6b1660/attachment.html
David Chelimsky
2008-Mar-01 00:06 UTC
[rspec-users] outside-in = integration tests on views?
On Fri, Feb 29, 2008 at 5:33 PM, David Beckwith <dbitsolutions at gmail.com> wrote:> Hi, > > In the spirit of "outside-in" are given-when-then scenarios supposed to be > integration tests of views?Do you mean "through views?" - i.e. view down to the db? If so, that is one part of the picture.> Or should we be accessing the model interfaces > directly (not through a view)?Why is this an either/or question? I think it depends on the nature of the story. If the story is about transferring money from checking to savings, then the domain objects are fair game. If the story talks about an error message, or some sort of user experience, then go through the views. What I try to do when dealing with views, though, is keep things as high level and general as I can while respecting the requirements. For example, you''re more likely to see "When I go to the list of employees" than "When I go to /employees." Or "When I enter David for Name" rather than "When I fill in the Name field with David." The reason is that "When I enter David for Name" can be talking about a web interface, a desktop interface, a batch job or a command line interface. If you think of :steps_for as a factory, because the step definitions are decoupled from the scenarios, you can use the same scenarios to drive steps that go through any of these different UIs, or no UIs at all. HTH, David> > Thanks, > David :) > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Beckwith
2008-Mar-03 01:34 UTC
[rspec-users] outside-in = integration tests on views?
Hi, 1. What is :steps_for for? 2. Is the GWT form of tests meant to replace it "should . . . . ." style of tests? I heard that GWT are written for your customer to represent a set of acceptance criteria, and it-should tests are more for programmers. Is that how we should think about the difference these two kinds of tests? Or are they really the same thing? BTW, Are the PeepCode rSpec tutorials worth buying? Thanks, David :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080302/a4303f8a/attachment-0001.html
> > > BTW, Are the PeepCode rSpec tutorials worth buying? >They are a steal. I watched them after I had already been using rSpec for a couple months and I still learned a lot and felt like they were a great investment. I haven''t watched the Story one yet but the general rspec ones were great. -Ben
> BTW, Are the PeepCode rSpec tutorials worth buying?Anything from PeepCode is worth buying imho, but the specifically, the three rspec ones I have watched have been excellent.
I just watched the story one on Sunday, and it was great. I bought a 5 pack and can''t wait to watch the next one. -Corey On Sun, Mar 2, 2008 at 10:49 PM, Ben Mabey <ben at benmabey.com> wrote:> > > > > > > BTW, Are the PeepCode rSpec tutorials worth buying? > > > > They are a steal. I watched them after I had already been using rSpec > for a couple months and I still learned a lot and felt like they were a > great investment. I haven''t watched the Story one yet but the general > rspec ones were great. > > -Ben > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- http://www.coreyhaines.com The Internet''s Premiere source of information about Corey Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080311/9179c10e/attachment.html