Sha256: f5660b223fc367e7d90d46fcfef2ca5b6d0e6031649653ff9f25d2aa96cb2eda

Contents?: true

Size: 477 Bytes

Versions: 24

Compression:

Stored size: 477 Bytes

Contents

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

Before do
  @calc = Calculator.new
end

After do
end

Given /我已經在計算機上輸入 (\d+)/ do |n|
  @calc.push n.to_i
end

When /我按下 (\w+)/ do |op|
  @result = @calc.send op
end

Then /螢幕上應該顯示 (.*)/ do |result|
  @result.should == result.to_f
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
notch8-cucumber-0.1.99.23 examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb
cucumber-0.2.1 examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb
cucumber-0.2.2 examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb
cucumber-0.2.0 examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb