examples/i18n/ro/features/step_definitons/calculator_steps.rb in cucumber-0.8.6 vs examples/i18n/ro/features/step_definitons/calculator_steps.rb in cucumber-0.8.7
- old
+ new
@@ -2,20 +2,23 @@
begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
require 'cucumber/formatter/unicode'
$:.unshift(File.dirname(__FILE__) + '/../../lib')
require 'calculator'
-Datfiind /un calculator/ do
+Before do
@calc = Calculator.new
end
-Cand /introduc (\d+)/ do |n|
+After do
+end
+
+Given /introduc (\d+)/ do |n|
@calc.push n.to_i
end
-Cand 'apăs tasta Egal' do
+When 'apas suma' do
@result = @calc.add
end
-Atunci /ecranul trebuie să afişeze (\d*)/ do |result|
+Then /rezultatul trebuie sa fie (\d*)/ do |result|
@result.should == result.to_i
end