[rspec-users] [CUCUMBER] Noob question
apremdas at gmail.com
Wed May 26 05:15:55 EDT 2010
On 25 May 2010 18:50, Pito Salas <lists at ruby-forum.com> wrote:
> Meta question: is this the right/best place to ask for assistance with
> Cucumber or am I in the wrong place?
> Anyway, here goes. I just started using cucumber and it's very
> Check out this fragment:
> And I go to the home page
> Then I should see "Choose Your Jurisdiction:" within "h2"
> And I follow "Middlesex"
> Then I should see "Middlesex" within "#user-navigation"
> My problem is that it's failing on the 4th step.
> And it looks like the "click" on the link "middlesex" didn't have the
> expected effect. In other words, when used interactively I see what I
> expect to see in user-navigation.
> So my question is about debugging this problem. What I need to know is:
> - is the "And I follow "Middlesex" step actually clicking on what I
> think it is?
> - is that click working or doing what it should do?
> - what page is being examined by the "Then I should see "Middlesex"
> within "#user-navigation" step?
> These are all debugging questions, right, if I could see those I could
> figure out what was going wrong.
> Any tips would be greatly appreciated!
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
With rspec you can put 'debugger' in your steps and then run the spec from
the command prompt. Make sure you have the ruby-debug gem installed. In
cucumber you can put a 'debugger' statement in any step definition.
Hopefully this will be enough to get you started
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users