nodejitsu/kyuri — Issue #27: Recursive error
Author: johngeorgewright
Created: 2012-02-18 16:43:39+00:00
State: open

Hello,

I've just started trying out kyuri today and while testing have hit an error I can't fathom. Maybe I've written my feature file incorrectly or maybe I've come across a bug. Could someone could point me in the right direction?

I haven't got to writing the actual tests yet, just the feature file. Here's what I started with, which worked as expected:

```
Feature: Authentication
In order to restrict anyone from viewing my personal details
As a user
I need to be authenticated before entering the site

Background:
Given credentials exist with an email "mung@face.com" and a password "test"

Scenario: Using incorrect credentials
Given I use the email "mung@face.com"
And I use the password "tester"
When I try and log in
Then I should be refused access

Scenario: Using correct credentials
Given I use the email "mung@face.com"
And I use the password "test"
When I try and log in
Then I should be granted access
```

But when I tried to change the first scenario into a scenario outline...:

```
Feature: Authentication
In order to restrict anyone from viewing my personal details
As a user
I need to be authenticated before entering the site

Background:
Given credentials exist with an email "mung@face.com" and a password "test"

Scenario Outline: Using incorrect credentials
Given I use the email ""
And I use the password ""
When I try and log in
Then I should be refused access

Examples:
| email | password |
| munge@face.com | test |
| mung@face.com | testie |

Scenario: Using correct credentials
Given I use the email "mung@face.com"
And I use the password "test"
When I try and log in
Then I should be granted access
```

... and ran kyuri it started recursively giving me a mixture of the following errors:

```
$ kyuri features
Caught Exception
undefined
Example
Caught Exception
undefined
Example
Caught Exception
undefined
Example
Given credentials exist with an email "mung@face.com" and a password "test"
Caught Exception
undefined
Caught Exception
undefined
Example
Given credentials exist with an email "mung@face.com" and a password "test"
Given I use the email ""
Caught Exception
undefined
Caught Exception
undefined
Caught Exception
undefined
Example
Given credentials exist with an email "mung@face.com" and a password "test"
Given I use the email ""
And I use the password ""
Caught Exception
undefined
Caught Exception
undefined
Caught Exception
undefined
Example
Caught Exception
undefined
Example
Given credentials exist with an email "mung@face.com" and a password "test"
Given I use the email ""
And I use the password ""
When I try and log in
Then I should be refused access
```