Sha256: f88117b162027f9b6c858530eb84dc9037f30a6cb94095a1633a5467efa1740d
Contents?: true
Size: 701 Bytes
Versions: 11
Compression:
Stored size: 701 Bytes
Contents
require 'cucumber/cli' # Needed in order to run the feature with ruby Feature %|Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers| 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 Fixnum" 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
11 entries across 11 versions & 4 rubygems