aslakhellesoy-cucumber 0.1.99.7 → 0.1.99.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,16 @@
1
1
  Característica: adición
2
2
  Para evitar hacer errores tontos
3
- Como contador
3
+ Como un matemático idiota
4
4
  Quiero saber la suma de los números
5
5
 
6
- Escenario: dos números
7
- Dado que he introducido 5
8
- Y he introducido 7
9
- Cuando añado
10
- Entonces el resultado debe ser 12
6
+ Esquema del escenario: Sumar dos números
7
+ Dado que he introducido <entrada_1> en la calculadora
8
+ Y que he introducido <entrada_2> en la calculadora
9
+ Cuando oprimo el <botón>
10
+ Entonces el resultado debe ser <resultado> en la pantalla
11
11
 
12
- Escenario: tres números
13
- Dado que he introducido 5
14
- Y he introducido 7
15
- Y he introducido 1
16
- Cuando añado
17
- Entonces el resultado debe ser 13
12
+ Ejemplos:
13
+ | entrada_1 | entrada_2 | botón | resultado |
14
+ | 20 | 30 | add | 50 |
15
+ | 2 | 5 | add | 7 |
16
+ | 0 | 40 | add | 40 |
@@ -8,17 +8,14 @@ Before do
8
8
  @calc = Calculador.new
9
9
  end
10
10
 
11
- After do
12
- end
13
-
14
- Given /he introducido (\d+)/ do |n|
11
+ Dado /que he introducido (\d+) en la calculadora/ do |n|
15
12
  @calc.push n.to_i
16
13
  end
17
14
 
18
- When 'añado' do
19
- @result = @calc.add
15
+ Cuando /oprimo el (\w+)/ do |op|
16
+ @result = @calc.send op
20
17
  end
21
18
 
22
- Then /el resultado debe ser (\d*)/ do |result|
23
- @result.should == result.to_i
24
- end
19
+ Entonces /el resultado debe ser (.*) en la pantalla/ do |result|
20
+ @result.should == result.to_f
21
+ end
@@ -5,7 +5,10 @@ class Calculador
5
5
  end
6
6
 
7
7
  def add
8
- #@args[0] + @args[1]
9
8
  @args.inject(0){|n,sum| sum+=n}
10
9
  end
10
+
11
+ def divide
12
+ @args[0].to_f / @args[1].to_f
13
+ end
11
14
  end
data/lib/cucumber/cli.rb CHANGED
@@ -57,7 +57,7 @@ module Cucumber
57
57
  opts.banner = ["Usage: cucumber [options] [[FILE[:LINE[:LINE]*]] | [FILES|DIRS]]", "",
58
58
  "Examples:",
59
59
  "cucumber examples/i18n/en/features",
60
- "cucumber --language it examples/i18n/it/features/somma.feature:6:98:113", "", "",
60
+ "cucumber --language it examples/i18n/it/features/somma.feature:6:98:113",
61
61
  "cucumber --no-snippets http://tinyurl.com/cuke-mastermind", "", "",
62
62
  ].join("\n")
63
63
  opts.on("-r LIBRARY|DIR", "--require LIBRARY|DIR",
@@ -103,8 +103,11 @@
103
103
  name: Spanish
104
104
  native: español
105
105
  encoding: UTF-8
106
+ background: Antecedentes
106
107
  feature: Característica
107
108
  scenario: Escenario
109
+ scenario_outline: Esquema del escenario
110
+ examples: Ejemplos
108
111
  given: Dado
109
112
  when: Cuando
110
113
  then: Entonces
@@ -3,7 +3,7 @@ module Cucumber #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
5
  TINY = 99
6
- PATCH = 7 # Set to nil for official release
6
+ PATCH = 8 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aslakhellesoy-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.99.7
4
+ version: 0.1.99.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"