similar to: StepGroup ?

Displaying 20 results from an estimated 10000 matches similar to: "StepGroup ?"

2008 Mar 13
22
Specifing methods in a steps_for block
Hey list, I''m refactoring some much-used functionality into a common_steps step group. Methods like this are in there: steps_for :common do Given "a number of existing $types?" do |type| @initial_item_count = type.singularize.classify.constantize.count end When "the user adds an invalid $type" do |type| post
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
2008 Mar 11
2
Composed Stories/Scenarios
In using stories, I find myself wanting to build scenarios on top of each other, For example I want something like Scenario: The user logs on Given a And b When c And d Then e And f Scenario: The user changes his password Given the user logs on And g Then h In other words, I''d like to write the second scenario starting with the ''state'' produced by
2007 Oct 02
6
color output?
does story runner have commandline options ,eg to add color to output?
2008 Mar 14
5
Branching scenarios, GivenScenario and database
I''m trying to use stories to drive some high-level design. I''ve got some branching scenarios where I want to follow a scenario, to establish a base situation, and then have different scenarios which ''branch'' out from that state, possibly several levels deep. I asked a bit about this a few days ago, and David pointed out the rather undocumented GivenScenario
2007 Nov 15
7
Plain Text Stories Chaining Scenarios
I''m writing a plain text story (testing the waters) and I have scenarios that I need to chain in my specs. Here is what I have so far: Story: User purchasing tshirts As a user I want to checkout So that I can purchase shirts Scenario: User goes to checkout with nothing in cart Given a user And user has an empty cart When user goes to checkout Then user
2008 Nov 04
8
Testing a wizard with Cucumber
Assuming you have a multi-step wizard like thing, with lots of different states and paths through it. What approach would your use to write a feature for it? What I want to do is do the separate states and then reuse these things in more complex scenarios that cover paths. For example Scenario: State A Given I''m ... And I''m ... When I ... Then I should see And I at
2007 Dec 21
4
StoryRunner docs/guidance
Hi all, Are there any plans for better documentation for the new StoryRunner feature? I tried to use it today (with Rails), and had a hard time getting my head around whether I was doing it "right" and exactly what things are appropriate to test at that level (this might be exacerbated by the fact that I''ve never really used integration testing that much). A full example of
2007 Sep 21
11
given_it
Hello, Just decided to check whether I am doing something that makes sense or not. I was thinking about how cool would it be to re-use examples (just like we reuse story scenarios with GivenScenario). I was not sure if this possibility already exists in rspec (and, honestly, was lazy to check), so I have created this helper: def given_it(name) example_definition =
2007 Sep 14
7
Posted this in "dev" last night but I''m not sure that anyone reads it
I''ve been using RSpec in anger for perhaps a total of a few days and just started playing with Story Runner. Love it. I also started working on a patch, which ought to be simple, to allow for Scenarios without supplied blocks to be treated as pending -- much like "it" in Spec::DSL::ExampleAPI. That said, I noticed something that seemed odd and chatted with Rein
2007 Oct 24
3
changes to Story Runner steps
Hi 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
2007 Oct 23
10
How is everyone structuring stories?
Bleeding-edge story-writers, How are you structuring your specs? I am working on a new project and tried this: ./lib ./blah ./spec ./blah ./stories But it breaks autotest, so I moved stories parallel to lib and spec. Also what about suffixes? I have adopted "xyz_story_spec.rb", and "xyz.story" for the time being, with the line runner =
2007 Sep 25
7
simple story, extract link
hi, I just started fooling around with story runner, thought I''d start with a dead simple scenario: The first thing I do when describing a site to someone is go to the home page, and begin exploring public pages from there. So, that seems like a good first story to spec out. And I''d really like to extract the actual link from the rendered page (rather than just
2008 May 11
5
Are you writing "imperative" or "declarative" scenarios in your stories?
Hey all, I just found Bryan Helmkamp''s (of webrat fame) slides on a presentation he did at GoRuCo 2008: http://www.brynary.com/2008/4/26/story-driven-development-slides-posted On slides 21-24 he talks about writing good stories and shows gives two examples.. the way not to do it and the way to do it. You can also see the video of the presentation at confreaks
2007 Nov 15
5
What command to run all stories?
Hi, I''ve been following this thread and I can get the example stories to run with the ruby command. But I''ve been unable to get the example from http://blog.davidchelimsky.net/articles/2007/10/25/plain-text-stories-part-iii to run with all.rb ruby stories/all.rb /home/edh/story/stories/additions/steps/addition_steps.rb:2: undefined method `steps_for'' for main:Object
2007 Oct 20
14
Problems with form_for and partials
i''m having problem with a form_for situation where i''m trying to DRY out the repeated parts of my forms and put them in common/form and render the form elements via another partial in controller_name/_form. Here''s the first form # app/views/common/form <% form_for ... do |f| -%> <%= render :partial => "params[:controller]/form", :object => f
2007 Oct 17
9
plain text stories: motivation number 27
This is mostly theoretical, but ... I''m starting to use lighthouse (http://llighthouseapp.com) for my projects at work. I''m organizing iterations as milestones and stories as tickets tagged to a milestone. Lighthouse offers an API so that you can write access the data in your account and write apps to process that data. I think you see where this is going. It seems to me that
2007 Sep 26
10
How do I best setup data for Story Runner?
Just started looking at the Story Runner integration, and am converting a few Rails integration tests to get a feel for it. My integration tests relied on fixtures, and since my models have a significant amount of validation (and hence need valid data unless I save without validation), this has made setup easy. With stories however, I''m wondering what the recommended approach is.
2007 Dec 13
8
stub with assigns?
is there a way to stub a method that sets an instance variable, so the stub sets it too? def find_foo @foo = Foo.find(params[:id] end ... controller.stub!(:find_foo).and_assigns(:foo, "123") -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071213/2042719f/attachment.html
2007 May 29
12
questions rspec on rails
Hi, rather than flooding this list with separate emails, I''ve been queueing up questions using rspec with rails. (an irc channel would be nice too :) Here ya go... - Is there a way to test named routes? - Could I get an example how to test an ajax request (link_to_remote)? would that go in view? and/or in controller spec? - Can you assert which layout template is rendered in a