changeset 15: | 64acf98d15f4 |
author: | moriq@moriq.com |
date: | Mon Mar 10 10:12:58 2008 +0900 (16 years ago) |
permissions: | -rw-r--r-- |
description: | add plugins rspec |
1require File.expand_path("#{File.dirname(__FILE__)}/../helper")23# This creates steps for :addition4steps_for(:addition) do5 Given("an addend of $addend") do |addend|6 @adder ||= Adder.new7 @adder << addend.to_i8 end9end1011# This appends to them12steps_for(:addition) do13 When("the addends are added") { @sum = @adder.sum }14end1516steps_for(:more_addition) do17 Then("the sum should be $sum") { |sum| @sum.should == sum.to_i }18end