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

Version Path
dchelimsky-rspec-1.1.10 examples/stories/steps/addition_steps.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/steps/addition_steps.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/steps/addition_steps.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/steps/addition_steps.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/steps/addition_steps.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/steps/addition_steps.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/steps/addition_steps.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb
picolena-0.1.1 rails_plugins/rspec/examples/stories/steps/addition_steps.rb
picolena-0.1.0 rails_plugins/rspec/examples/stories/steps/addition_steps.rb
picolena-0.1.2 rails_plugins/rspec/examples/stories/steps/addition_steps.rb
picolena-0.1.3 rails_plugins/rspec/examples/stories/steps/addition_steps.rb
picolena-0.1.4 rails_plugins/rspec/examples/stories/steps/addition_steps.rb
picolena-0.1.6 rails_plugins/rspec/examples/stories/steps/addition_steps.rb
picolena-0.1.5 rails_plugins/rspec/examples/stories/steps/addition_steps.rb
picolena-0.1.7 rails_plugins/rspec/examples/stories/steps/addition_steps.rb