cucumber 0.3.3 → 0.3.4
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.
- data/History.txt +44 -1
- data/Manifest.txt +11 -1
- data/bin/cucumber +11 -1
- data/examples/cs/Rakefile +1 -1
- data/examples/cs/features/addition.feature +5 -5
- data/examples/cs/features/step_definitons/calculator_steps.rb +2 -2
- data/examples/dos_line_endings/Rakefile +1 -1
- data/examples/i18n/ar/Rakefile +1 -1
- data/examples/i18n/bg/Rakefile +1 -1
- data/examples/i18n/cat/Rakefile +6 -0
- data/examples/i18n/cat/features/step_definitons/calculator_steps.rb +21 -0
- data/examples/i18n/cat/features/suma.feature +16 -0
- data/examples/i18n/cat/lib/calculadora.rb +16 -0
- data/examples/i18n/da/Rakefile +1 -1
- data/examples/i18n/de/Rakefile +1 -1
- data/examples/i18n/en-lol/Rakefile +1 -1
- data/examples/i18n/en/Rakefile +1 -1
- data/examples/i18n/es/Rakefile +1 -1
- data/examples/i18n/et/Rakefile +1 -1
- data/examples/i18n/fi/Rakefile +1 -1
- data/examples/i18n/fr/Rakefile +1 -1
- data/examples/i18n/he/Rakefile +1 -1
- data/examples/i18n/hu/Rakefile +1 -1
- data/examples/i18n/id/Rakefile +1 -1
- data/examples/i18n/it/Rakefile +1 -1
- data/examples/i18n/ja/Rakefile +1 -1
- data/examples/i18n/ko/Rakefile +1 -1
- data/examples/i18n/lt/Rakefile +1 -1
- data/examples/i18n/lt/features/addition.feature +2 -3
- data/examples/i18n/lv/Rakefile +1 -1
- data/examples/i18n/no/Rakefile +1 -1
- data/examples/i18n/pt/Rakefile +1 -1
- data/examples/i18n/pt/features/step_definitions/calculadora_steps.rb +3 -7
- data/examples/i18n/pt/features/support/env.rb +6 -0
- data/examples/i18n/ro/Rakefile +1 -1
- data/examples/i18n/ru/Rakefile +1 -1
- data/examples/i18n/se/Rakefile +1 -1
- data/examples/i18n/sk/Rakefile +1 -1
- data/examples/i18n/zh-CN/Rakefile +1 -1
- data/examples/i18n/zh-TW/Rakefile +1 -1
- data/examples/java/README.textile +2 -6
- data/examples/java/build.xml +26 -0
- data/examples/java/features/step_definitons/hello_steps.rb +0 -2
- data/examples/junit/features/one_passing_one_failing.feature +8 -0
- data/examples/junit/features/pending.feature +5 -0
- data/examples/junit/features/step_definitions/steps.rb +11 -0
- data/examples/selenium/Rakefile +1 -1
- data/examples/selenium_webrat/Rakefile +1 -1
- data/examples/sinatra/Rakefile +1 -1
- data/examples/test_unit/Rakefile +1 -1
- data/examples/tickets/Rakefile +3 -3
- data/examples/tickets/features/177/1.feature +29 -29
- data/examples/tickets/features/177/2.feature +20 -20
- data/examples/watir/Rakefile +1 -1
- data/features/junit_formatter.feature +59 -0
- data/features/rake_task.feature +4 -4
- data/features/step_definitions/cucumber_steps.rb +25 -2
- data/gem_tasks/features.rake +5 -1
- data/lib/cucumber.rb +2 -2
- data/lib/cucumber/cli/configuration.rb +28 -32
- data/lib/cucumber/cli/main.rb +0 -2
- data/lib/cucumber/core_ext/proc.rb +9 -13
- data/lib/cucumber/formatter.rb +1 -1
- data/lib/cucumber/formatter/html.rb +1 -0
- data/lib/cucumber/formatter/junit.rb +78 -0
- data/lib/cucumber/languages.yml +36 -4
- data/lib/cucumber/parser/feature.rb +10 -6
- data/lib/cucumber/parser/feature.tt +18 -14
- data/lib/cucumber/rake/task.rb +92 -24
- data/lib/cucumber/step_mother.rb +3 -0
- data/lib/cucumber/version.rb +1 -1
- data/rails_generators/cucumber/templates/cucumber.rake +2 -1
- data/spec/cucumber/cli/configuration_spec.rb +9 -18
- metadata +13 -3
- data/examples/java/Rakefile +0 -12
data/History.txt
CHANGED
@@ -1,3 +1,46 @@
|
|
1
|
+
== 0.3.4 2009-05-14
|
2
|
+
|
3
|
+
A couple of great new features in this release. Running with Rake is faster than before,
|
4
|
+
and there is a brand new JUnit formatter - great for Continuous Integration reports!
|
5
|
+
|
6
|
+
This release was made especially for the Oslo XP Meetup today.
|
7
|
+
|
8
|
+
** IMPORTANT UPGRADE NOTES FOR RAILS USERS **
|
9
|
+
|
10
|
+
Running Cucumber features in the same Ruby interpreter as Rake doesn't seem to work,
|
11
|
+
so you have to explicitly tell the task to fork (like it was doing by default in prior
|
12
|
+
versions). In lib/tasks/cucumber.rake:
|
13
|
+
|
14
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
15
|
+
t.fork = true # Explicitly fork
|
16
|
+
t.cucumber_opts = %w{--format pretty}
|
17
|
+
end
|
18
|
+
|
19
|
+
(If you run script/generate cucumber this will be done for you).
|
20
|
+
Alternatively you can omit forking and run features like this:
|
21
|
+
|
22
|
+
RAILS_ENV=test rake features
|
23
|
+
|
24
|
+
However, setting the RAILS_ENV is easy to forget, so I don't recommend relying on this.
|
25
|
+
|
26
|
+
=== Bugfixes
|
27
|
+
* Hooks (World, Before, After) are no longer executed when --dry-run (Aslak Hellesøy)
|
28
|
+
* Proper UTF8 use in HTML formatter (Herminio Torres)
|
29
|
+
* Problem with multiple terms in languages.yml (#321 Aslak Hellesøy)
|
30
|
+
|
31
|
+
=== New features
|
32
|
+
* New JUnit formatter (Gareth Jones)
|
33
|
+
* Support for Vietnamese (Ngoc Dao)
|
34
|
+
* Added aliases for Feature and But in Japanese (Leonard Chin)
|
35
|
+
* Support for Catalan (Francesc Esplugas)
|
36
|
+
|
37
|
+
=== Changed features
|
38
|
+
* The Java example under examples/java uses Ant instead of Rake - and the new JUnit formatter.
|
39
|
+
* Rake task should not shell out (#297 Aslak Hellesøy)
|
40
|
+
The Cucumber Rake task will run Cucumber in the same Ruby interpreter as Rake itself
|
41
|
+
unless explicitly told to fork a new interpreter. This is to increase speed. You can
|
42
|
+
force a new interpreter by setting fork=true or rcov=true in the task.
|
43
|
+
|
1
44
|
== 0.3.3 2009-05-10
|
2
45
|
|
3
46
|
Minor bugfix release, made specially for EuRuKo!
|
@@ -235,7 +278,7 @@ for multiline arguments are some of the highlights.
|
|
235
278
|
* Pure Ruby features are no longer supported.
|
236
279
|
* Remove --color option in autotest. Can be added manually in cucumber.yml (#215 Jean-Michel Garnier)
|
237
280
|
|
238
|
-
== (0.16.4 aslakhellesoy-cucumber gem on GitHub)
|
281
|
+
== (0.1.16.4 aslakhellesoy-cucumber gem on GitHub)
|
239
282
|
|
240
283
|
Bugfix release.
|
241
284
|
|
data/Manifest.txt
CHANGED
@@ -29,6 +29,10 @@ examples/i18n/bg/features/step_definitons/calculator_steps.rb
|
|
29
29
|
examples/i18n/bg/features/support/env.rb
|
30
30
|
examples/i18n/bg/features/support/world.rb
|
31
31
|
examples/i18n/bg/lib/calculator.rb
|
32
|
+
examples/i18n/cat/Rakefile
|
33
|
+
examples/i18n/cat/features/step_definitons/calculator_steps.rb
|
34
|
+
examples/i18n/cat/features/suma.feature
|
35
|
+
examples/i18n/cat/lib/calculadora.rb
|
32
36
|
examples/i18n/da/Rakefile
|
33
37
|
examples/i18n/da/features/step_definitons/kalkulator_steps.rb
|
34
38
|
examples/i18n/da/features/summering.feature
|
@@ -114,6 +118,7 @@ examples/i18n/no/lib/kalkulator.rb
|
|
114
118
|
examples/i18n/pt/Rakefile
|
115
119
|
examples/i18n/pt/features/adicao.feature
|
116
120
|
examples/i18n/pt/features/step_definitions/calculadora_steps.rb
|
121
|
+
examples/i18n/pt/features/support/env.rb
|
117
122
|
examples/i18n/pt/lib/calculadora.rb
|
118
123
|
examples/i18n/ro/Rakefile
|
119
124
|
examples/i18n/ro/features/step_definitons/calculator_steps.rb
|
@@ -146,12 +151,15 @@ examples/i18n/zh-TW/features/division.feature
|
|
146
151
|
examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb
|
147
152
|
examples/i18n/zh-TW/lib/calculator.rb
|
148
153
|
examples/java/README.textile
|
149
|
-
examples/java/
|
154
|
+
examples/java/build.xml
|
150
155
|
examples/java/features/hello.feature
|
151
156
|
examples/java/features/step_definitons/hello_steps.rb
|
152
157
|
examples/java/features/step_definitons/tree_steps.rb
|
153
158
|
examples/java/features/tree.feature
|
154
159
|
examples/java/src/cucumber/demo/Hello.java
|
160
|
+
examples/junit/features/one_passing_one_failing.feature
|
161
|
+
examples/junit/features/pending.feature
|
162
|
+
examples/junit/features/step_definitions/steps.rb
|
155
163
|
examples/pure_java/README.textile
|
156
164
|
examples/selenium/Rakefile
|
157
165
|
examples/selenium/features/search.feature
|
@@ -236,6 +244,7 @@ features/cucumber_cli_diff_disabled.feature
|
|
236
244
|
features/cucumber_cli_outlines.feature
|
237
245
|
features/custom_formatter.feature
|
238
246
|
features/exclude_files.feature
|
247
|
+
features/junit_formatter.feature
|
239
248
|
features/multiline_names.feature
|
240
249
|
features/rake_task.feature
|
241
250
|
features/report_called_undefined_steps.feature
|
@@ -291,6 +300,7 @@ lib/cucumber/formatter/console.rb
|
|
291
300
|
lib/cucumber/formatter/cucumber.css
|
292
301
|
lib/cucumber/formatter/cucumber.sass
|
293
302
|
lib/cucumber/formatter/html.rb
|
303
|
+
lib/cucumber/formatter/junit.rb
|
294
304
|
lib/cucumber/formatter/pretty.rb
|
295
305
|
lib/cucumber/formatter/profile.rb
|
296
306
|
lib/cucumber/formatter/progress.rb
|
data/bin/cucumber
CHANGED
@@ -3,4 +3,14 @@
|
|
3
3
|
$:.unshift(File.dirname(__FILE__ + '.rb') + '/../lib') unless $:.include?(File.dirname(__FILE__ + '.rb') + '/../lib')
|
4
4
|
|
5
5
|
require 'cucumber/cli/main'
|
6
|
-
|
6
|
+
begin
|
7
|
+
# The dup is to keep ARGV intact, so that tools like ruby-debug can respawn.
|
8
|
+
failure = Cucumber::Cli::Main.execute(ARGV.dup)
|
9
|
+
Kernel.exit(failure ? 1 : 0)
|
10
|
+
rescue SystemExit => e
|
11
|
+
Kernel.exit(e.status)
|
12
|
+
rescue Exception => e
|
13
|
+
STDERR.puts("#{e.message} (#{e.class})")
|
14
|
+
STDERR.puts(e.backtrace.join("\n"))
|
15
|
+
Kernel.exit 1
|
16
|
+
end
|
data/examples/cs/Rakefile
CHANGED
@@ -3,13 +3,13 @@ Feature: Addition
|
|
3
3
|
As a math idiot
|
4
4
|
I want to be told the sum of two numbers
|
5
5
|
|
6
|
-
Scenario: Add two numbers
|
7
|
-
Given I have entered
|
8
|
-
And I have entered
|
6
|
+
Scenario Outline: Add two numbers
|
7
|
+
Given I have entered <input_1> into the calculator
|
8
|
+
And I have entered <input_2> into the calculator
|
9
9
|
When I press add
|
10
|
-
Then the result should be
|
10
|
+
Then the result should be <output> on the screen
|
11
11
|
|
12
|
-
|
12
|
+
Examples:
|
13
13
|
| input_1 | input_2 | output |
|
14
14
|
| 20 | 30 | 50 |
|
15
15
|
| 2 | 5 | 7 |
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'spec/expectations'
|
2
2
|
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
3
|
-
require 'Calculator'
|
3
|
+
require 'Calculator' # Calculator.dll
|
4
4
|
|
5
5
|
Before do
|
6
|
-
@calc = Demo::Calculator.new
|
6
|
+
@calc = Demo::Calculator.new # A .NET class in Calculator.dll
|
7
7
|
end
|
8
8
|
|
9
9
|
Given "I have entered $n into the calculator" do |n|
|
data/examples/i18n/ar/Rakefile
CHANGED
data/examples/i18n/bg/Rakefile
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec/expectations'
|
3
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
|
+
require 'cucumber/formatter/unicode'
|
5
|
+
require 'calculadora'
|
6
|
+
|
7
|
+
Before do
|
8
|
+
@calc = Calculadora.new
|
9
|
+
end
|
10
|
+
|
11
|
+
Donat /que he introduït (\d+) a la calculadora/ do |n|
|
12
|
+
@calc.push n.to_i
|
13
|
+
end
|
14
|
+
|
15
|
+
Quan /premo el (\w+)/ do |op|
|
16
|
+
@result = @calc.send op
|
17
|
+
end
|
18
|
+
|
19
|
+
Aleshores /el resultat ha de ser (\d+) a la pantalla/ do |result|
|
20
|
+
@result.should == result.to_f
|
21
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Característica: Suma
|
2
|
+
Per evitar fer errors tontos
|
3
|
+
Com un matemàtic idiota
|
4
|
+
Vull saber la suma dels números
|
5
|
+
|
6
|
+
Esquema de l'escenari: Sumar dos números
|
7
|
+
Donat que he introduït <entrada_1> a la calculadora
|
8
|
+
I que he introduït <entrada_2> a la calculadora
|
9
|
+
Quan premo el <botó>
|
10
|
+
Aleshores el resultat ha de ser <resultat> a la pantalla
|
11
|
+
|
12
|
+
Exemples:
|
13
|
+
| entrada_1 | entrada_2 | botó | resultat |
|
14
|
+
| 20 | 30 | add | 50 |
|
15
|
+
| 2 | 5 | add | 7 |
|
16
|
+
| 0 | 40 | add | 40 |
|
data/examples/i18n/da/Rakefile
CHANGED
data/examples/i18n/de/Rakefile
CHANGED
data/examples/i18n/en/Rakefile
CHANGED
data/examples/i18n/es/Rakefile
CHANGED
data/examples/i18n/et/Rakefile
CHANGED
data/examples/i18n/fi/Rakefile
CHANGED
data/examples/i18n/fr/Rakefile
CHANGED
data/examples/i18n/he/Rakefile
CHANGED
data/examples/i18n/hu/Rakefile
CHANGED
data/examples/i18n/id/Rakefile
CHANGED
data/examples/i18n/it/Rakefile
CHANGED
data/examples/i18n/ja/Rakefile
CHANGED
data/examples/i18n/ko/Rakefile
CHANGED
data/examples/i18n/lt/Rakefile
CHANGED
@@ -3,14 +3,13 @@ Sąvybė: Sudėtis
|
|
3
3
|
Kaip matematinis idiotas
|
4
4
|
Aš noriu, kad man pasakytų dviejų skaičių sumą
|
5
5
|
|
6
|
-
|
7
|
-
Scenario Outline: dviejų skaičių sudėtis
|
6
|
+
Scenarijaus šablonas: dviejų skaičių sudėtis
|
8
7
|
Duota aš įvedžiau <įvestis_1> į skaičiuotuvą
|
9
8
|
Ir aš įvedžiau <įvestis_2> į skaičiuotuvą
|
10
9
|
Kai aš paspaudžiu "<mygtukas>"
|
11
10
|
Tada rezultatas ekrane turi būti <išvestis>
|
12
11
|
|
13
|
-
|
12
|
+
Pavyzdžiai
|
14
13
|
| įvestis_1 | įvestis_2 | mygtukas | išvestis |
|
15
14
|
| 20 | 30 | add | 50 |
|
16
15
|
| 2 | 5 | add | 7 |
|
data/examples/i18n/lv/Rakefile
CHANGED
data/examples/i18n/no/Rakefile
CHANGED
data/examples/i18n/pt/Rakefile
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
|
-
require 'cucumber/formatter/unicode'
|
5
|
-
require 'calculadora'
|
6
2
|
|
7
3
|
Before do
|
8
4
|
@calc = Calculadora.new
|
@@ -11,14 +7,14 @@ end
|
|
11
7
|
After do
|
12
8
|
end
|
13
9
|
|
14
|
-
|
10
|
+
Dado /que eu digitei (\d+) na calculadora/ do |n|
|
15
11
|
@calc.push n.to_i
|
16
12
|
end
|
17
13
|
|
18
|
-
|
14
|
+
Quando 'eu aperto o botão de soma' do
|
19
15
|
@result = @calc.soma
|
20
16
|
end
|
21
17
|
|
22
|
-
|
18
|
+
Então /o resultado na calculadora deve ser (\d*)/ do |result|
|
23
19
|
@result.should == result.to_i
|
24
20
|
end
|