Sha256: 333de9996dd89504f4b5c256394f4320fe3068c4c0423a9b3f1dc73ae3d256c6
Contents?: true
Size: 437 Bytes
Versions: 57
Compression:
Stored size: 437 Bytes
Contents
require File.expand_path("#{File.dirname(__FILE__)}/../helper") # This creates steps for :addition steps_for(:addition) do Given("an addend of $addend") do |addend| @adder ||= Adder.new @adder << addend.to_i end end # This appends to them steps_for(:addition) do When("the addends are added") { @sum = @adder.sum } end steps_for(:more_addition) do Then("the sum should be $sum") { |sum| @sum.should == sum.to_i } end
Version data entries
57 entries across 57 versions & 9 rubygems