Skip to content

Commit

Permalink
WIP: Add a failing example calling a step definition from within a st…
Browse files Browse the repository at this point in the history
…ep definition.
  • Loading branch information
josephwilk committed Apr 18, 2010
1 parent 63a94cc commit 67f626a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/javascript/features/fibonacci.feature
Expand Up @@ -35,4 +35,7 @@ Feature: Fibonacci

@do-fibonnacci-in-before-hook
Scenario: Single series with Before hook with a tag label
Then it should give me [1, 1, 2]
Then it should give me [1, 1, 2]

Scenario: Single series by calling a step from within a step
Then it should give me [1, 1] via calling another step definition
6 changes: 6 additions & 0 deletions examples/javascript/features/step_definitions/fib_steps.js
Expand Up @@ -37,3 +37,9 @@ Then(/^it should contain:$/, function(table){
assertMatches(hashes[0]['cell 1'], fibResult);
assertMatches(hashes[0]['cell 2'], fibResult);
});

Then(/^it should give me (\[.*\]) via calling another step definition$/, function(expectedResult){
Given("I ask Javascript to calculate fibonacci up to 2");
assertEqual(expectedResult, fibResult);
});

0 comments on commit 67f626a

Please sign in to comment.