Sha256: 9594378c5b8dc10ac5746050206d95945615bcdb0b969e4f6d827d9131412a27

Contents?: true

Size: 491 Bytes

Versions: 135

Compression:

Stored size: 491 Bytes

Contents

# encoding: utf-8
require 'spec/expectations'
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
require 'cucumber/formatter/unicode'
require 'calculator'

Before do
  @calc = Calculator.new
end

After do
end

Given /I have entered (\d+) into the calculator/ do |n|
  @calc.push n.to_i
end

When /I press (\w+)/ do |op|
  @result = @calc.send op
end

Then /the result should be (.*) on the screen/ do |result|
  @result.should == result.to_f
end

Version data entries

135 entries across 135 versions & 14 rubygems

Version Path
middleman-0.10.14 vendor/gems/gems/cucumber-0.4.4/examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.4.4 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.4.3 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.4.2 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.4.1 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.4.0 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.4.0.rc1 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.104 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.103 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.102 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.101 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.100 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.99 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.98 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.97 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.96 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.95 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.94 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.90 examples/i18n/en/features/step_definitons/calculator_steps.rb
cucumber-0.3.91 examples/i18n/en/features/step_definitons/calculator_steps.rb