Sha256: 13d6e50de3b8d4579a5d49ca8062a1315eef7de035aa7f2dbf067eeb456f4f03

Contents?: true

Size: 1.35 KB

Versions: 87

Compression:

Stored size: 1.35 KB

Contents

Before(function(){
  fibResult = 0;
});

Before(['@do-fibonnacci-in-before-hook', '@reviewed'], function(){
  fibResult = fibonacciSeries(3);
});

After(function(){
  //throw 'Sabotage scenario';
});

Transform(/^(\d+)$/, function(n){
  return parseInt(n);
});

When(/^I ask Javascript to calculate fibonacci up to (\d+)$/, function(n){
  assertEqual(fibResult, 0);
  fibResult = fibonacciSeries(n);
});

When(/^I ask Javascript to calculate fibonacci up to (\d+) with formatting$/, function(n){
  assertEqual(0, fibResult)
  fibResult = fibonacciSeriesFormatted(n);
});

Then(/^it should give me (\[.*\])$/, function(expectedResult){
  assertEqual(expectedResult, fibResult)
});

Then(/^it should give me:$/, function(string){
  assertEqual(string, fibResult);
});

Then(/^it should contain:$/, function(table){
  var hashes = table.hashes;
  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);
});

Then(/^it should calculate fibonacci up to (\d+) giving me (\[.*\])/, function(n, expectedResult){
  steps("Given I ask Javascript to calculate fibonacci up to "+ n + "\n" +
        "Then it should give me "+ expectedResult);
});

Version data entries

87 entries across 85 versions & 11 rubygems

Version Path
cucumber-1.3.20 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.19 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.18 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.17 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.16 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.15 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.14 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.13 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.12 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.11 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.10 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.9 examples/v8/features/step_definitions/fib_steps.js
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/cucumber-1.2.1/examples/v8/features/step_definitions/fib_steps.js
candlepin-api-0.4.0 bundle/ruby/gems/cucumber-1.2.1/examples/v8/features/step_definitions/fib_steps.js
candlepin-api-0.4.0 bundle/ruby/1.8/gems/cucumber-1.2.1/examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.8 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.7 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.6 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.5 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.3.4 examples/v8/features/step_definitions/fib_steps.js