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.0.1 examples/v8/features/step_definitions/fib_steps.js
cucumber-1.0.0 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.8.7 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.8.6 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.10.7 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.10.6 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.10.5 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.10.3 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.10.2 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.10.1 examples/v8/features/step_definitions/fib_steps.js
stefl-cucumber-0.10.1 examples/v8/features/step_definitions/fib_steps.js
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/features/step_definitions/fib_steps.js
vim-jar-0.1.2 bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/features/step_definitions/fib_steps.js
vim-jar-0.1.1 bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/features/step_definitions/fib_steps.js
vim-jar-0.1.0 bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/features/step_definitions/fib_steps.js
cucumber-0.10.0 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.9.4 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.9.3 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.9.2 examples/v8/features/step_definitions/fib_steps.js
cucumber-0.9.1 examples/v8/features/step_definitions/fib_steps.js