Sha256: 09d836e155fea0d940924196fd1ed9b2c1e7e783cc8fd6f53156671458612e5b
Contents?: true
Size: 703 Bytes
Versions: 2
Compression:
Stored size: 703 Bytes
Contents
require 'cucumber/cli' # Needed in order to run the feature with ruby Feature %|Addition As a math idiot I want to be told the sum of two numbers So that I don't make silly mistakes| do Scenario "Add two numbers" do Given "I have entered 50 into the calculator" And "I have entered 70 into the calculator" When "I add" Then "the result should be 120 on the screen" And "the result class should be Float" end Table do |t| t | "input_1" | "input_2" | "output" | "class" | t # This is kind of dumb - but it illustrates how scenarios can be "generated" in code. 10.times do |n| t | n | n*2 | n*3 | Fixnum | t end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aslakhellesoy-cucumber-0.1.1 | examples/pure_ruby/features/addition.rb |
aslakhellesoy-cucumber-0.1.2 | examples/pure_ruby/features/addition.rb |