Tim Haines
2008-Apr-11 00:40 UTC
[rspec-users] Creating stories for the second resource. Very wet approach
Hi y''all I''m about to start writing up the stories for my second resource. The second resource is so similar to the first that I feel a good way for me to start might be to copy and paste the stories and edit from there. This seems very anti-dry though. Am I missing something obvious, or would you expect (and be happy with) a lot of duplication between stories? Tim. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080411/402af3e0/attachment.html
Joseph Wilk
2008-Apr-17 13:44 UTC
[rspec-users] Creating stories for the second resource. Very wet appro
Hello, I''ve come across a similar problem. Sharing the steps is the easy bit. And I''ve started to create a ''useful_steps.rb'' for storing very common steps. I have just copy and pasted the plain text stories before but since they use the same steps, there was little new steps to write. It feels like the steps are where you want to keep it dry but the stories are the domain specific language to writing acceptance/integration tests. So it is similar problem to saying that models contain lots of ''has_ones'' and hence are not dry. Well thats the conclusions I''ve been coming to after using stories for a while. -- Joseph Wilk http://www.joesniff.co.uk Tim Haines wrote:> Hi y''all > > I''m about to start writing up the stories for my second resource. The > second resource is so similar to the first that I feel a good way for me > to > start might be to copy and paste the stories and edit from there. This > seems very anti-dry though. Am I missing something obvious, or would > you > expect (and be happy with) a lot of duplication between stories? > > Tim.-- Posted via http://www.ruby-forum.com/.
Bart Zonneveld
2008-Apr-18 18:16 UTC
[rspec-users] Creating stories for the second resource. Very wet appro
On 17 apr 2008, at 15:44, Joseph Wilk wrote:> Hello, > > I''ve come across a similar problem. Sharing the steps is the easy bit. > And I''ve started to create a ''useful_steps.rb'' for storing very common > steps.So have I. I use a lot of "Given a number of flurps in the system", and "When I add a new zoink", most as as refactored and abstracted as possible in common_steps.rb. Also, a form_steps.rb for common webrat steps.> I have just copy and pasted the plain text stories before but since > they > use the same steps, there was little new steps to write...which isn''t wrong per se imho. Steps for removing, and editing a post all start from the same initial state, "Given an existing post".> It feels like the steps are where you want to keep it dry but the > stories are the domain specific language to writing > acceptance/integration tests.Exactly. Stories may share steps, but the overal flow is always different. If not, your stories aren''t 100% accurate.> So it is similar problem to saying that models contain lots of > ''has_ones'' and hence are not dry.Nice analogy :) gr, bartz> Well thats the conclusions I''ve been coming to after using stories > for a > while. > > -- > Joseph Wilk > http://www.joesniff.co.uk > > > > Tim Haines wrote: >> Hi y''all >> >> I''m about to start writing up the stories for my second resource. >> The >> second resource is so similar to the first that I feel a good way >> for me >> to >> start might be to copy and paste the stories and edit from there. >> This >> seems very anti-dry though. Am I missing something obvious, or would >> you >> expect (and be happy with) a lot of duplication between stories? >> >> Tim. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users