~ubuntu-branches/ubuntu/wily/cucumber/wily-proposed

« back to all changes in this revision

Viewing changes to examples/i18n/en/features/step_definitons/calculator_steps.rb

  • Committer: Package Import Robot
  • Author(s): Cédric Boutillier, Antonio Terceiro, Cédric Boutillier
  • Date: 2015-06-20 16:52:32 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20150620165232-hznc8mxma08er27p
Tags: 2.0.0-1
[ Antonio Terceiro ]
* debian/cucumber.pod: fix typo in manpage (Closes: #767215)

[ Cédric Boutillier ]
* Imported Upstream version 2.0.0
* rename the file in debian/missing-source to remove -min suffix, and make
  lintian happy
* reproducibility: use last changelog date to build the manpage
* update 0004-Update_default_binary_path.patch
* drop 0001-Remove-rubygems-bundler-stuff-from-spec_helper.patch, not needed
  anymore
* build-depend on pry
* depend on ruby-cucumber-core

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# encoding: utf-8
2
 
begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end 
3
 
require 'cucumber/formatter/unicode'
4
 
$:.unshift(File.dirname(__FILE__) + '/../../lib')
5
 
require 'calculator'
6
 
 
7
 
Before do
8
 
  @calc = Calculator.new
9
 
end
10
 
 
11
 
After do
12
 
end
13
 
 
14
 
Given /I have entered (\d+) into the calculator/ do |n|
15
 
  @calc.push n.to_i
16
 
end
17
 
 
18
 
When /I press (\w+)/ do |op|
19
 
  @result = @calc.send op
20
 
end
21
 
 
22
 
Then /the result should be (.*) on the screen/ do |result|
23
 
  @result.should == result.to_f
24
 
end