search for: stepgroup

Displaying 5 results from an estimated 5 matches for "stepgroup".

2007 Dec 22
4
StepGroup ?
Hi, I have a need for the StepGroup feature in stories but not clear what''s the current api. Could you provide an example? In my case I have several scenarios which vary in the Givens, but not the results. Ideally I''m hoping to achieve something like: (but anything will do for now :) Scenario: one Given s...
2007 Oct 24
3
changes to Story Runner steps
...all, The following only affects people who have bravely begun to experiment with the 2 day-old plain text story runner and definable groups of steps. For those who fit that bill, I just committed a few changes that will require you to make changes to your code. The StepMatchers class is now the StepGroup class. The step_matchers methods on PlainTextStoryRunner and StepGroup is now just steps. So instead of defining a group like this: # old - no longer supported matchers = StepMatchers.new do step_matchers do |add| add.given(...) {...} end end # new steps = StepGroup.new do steps do |ad...
2008 Mar 13
22
Specifing methods in a steps_for block
...thod=post]'') end end This more or less works for me. However, I''m interested in two things. First, is this good practice? It''s DRY, but I''m coupling my stories to these common steps in a way.. And second, is it possible to define a method in my specific stepgroup, that can be called from my common stepgroup? For instance, in the "user adds a valid type" step, I call a valid_attributes method. I''d like to define that on the specific stepgroup, but so far I haven''t been able to get it called... thanks! bartz
2008 Mar 13
0
Equivalent to before(:all) for StepGroups?
I have a helper object that I''d like to have available inside each of my story steps, but would like to declare it *outside* all the steps. (It knows how to create various objects in my library, then stores a string reference to it for later steps to refer to.) Problem is, I''ve tried assigning to a module variable both inside and outside my steps_for block, and I get an error
2008 Jun 14
15
Reusing story snippets
I find myself doing this: Scenario "logged in user visiting the home page" do Given "A logged in user" do a_logged_in_user end When "..." Then "..." end The a_logged_in_user method is a helper method in helper.rb which sets up the state so that the user can browse the website. Later in the story of course, I can just do ''Given