aslakhellesoy-cucumber 0.1.16.2 → 0.1.16.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +9 -8
- data/Manifest.txt +0 -8
- data/bin/cucumber +1 -1
- data/examples/cs/features/addition.feature +4 -5
- data/examples/cs/features/step_definitons/calculator_steps.rb +0 -4
- data/examples/i18n/de/features/addition.feature +4 -5
- data/examples/i18n/de/features/division.feature +0 -1
- data/examples/i18n/de/features/step_definitons/calculator_steps.rb +0 -8
- data/examples/i18n/en/features/addition.feature +4 -5
- data/examples/i18n/en/features/division.feature +0 -1
- data/examples/i18n/en/features/step_definitons/calculator_steps.rb +0 -4
- data/examples/i18n/et/features/liitmine.feature +4 -5
- data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +0 -4
- data/examples/i18n/fi/features/jakolasku.feature +0 -1
- data/examples/i18n/fi/features/step_definitons/laskin_steps.rb +0 -4
- data/examples/i18n/fi/features/yhteenlasku.feature +4 -5
- data/examples/i18n/id/features/addition.feature +4 -5
- data/examples/i18n/id/features/division.feature +0 -1
- data/examples/i18n/id/features/step_definitons/calculator_steps.rb +0 -9
- data/examples/i18n/ja/features/addition.feature +4 -5
- data/examples/i18n/ja/features/division.feature +0 -1
- data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +0 -8
- data/examples/i18n/ko/features/addition.feature +4 -5
- data/examples/i18n/ko/features/division.feature +0 -1
- data/examples/i18n/ko/features/step_definitons/calculator_steps.rb +0 -4
- data/examples/i18n/lt/features/addition.feature +4 -5
- data/examples/i18n/lt/features/division.feature +0 -1
- data/examples/i18n/lt/features/step_definitons/calculator_steps.rb +0 -9
- data/lib/cucumber/version.rb +1 -1
- data/spec/cucumber/treetop_parser/feature_parser_spec.rb +1 -1
- data/spec/cucumber/treetop_parser/multiple_tables.feature +6 -8
- metadata +2 -2
- data/script/console +0 -10
- data/script/console.cmd +0 -1
- data/script/destroy +0 -14
- data/script/destroy.cmd +0 -1
- data/script/generate +0 -14
- data/script/generate.cmd +0 -1
- data/script/txt2html +0 -74
- data/script/txt2html.cmd +0 -1
data/History.txt
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
== Git
|
1
|
+
== 0.1.16.x (Git)
|
2
2
|
|
3
3
|
=== New features
|
4
|
-
|
5
4
|
* Finnish translation (Tero Tilus)
|
6
|
-
* Use Webrat's #contain matcher in generated "I should (not) see" step definitions
|
5
|
+
* Use Webrat's #contain matcher in generated "I should (not) see" step definitions (Bryan Helmkamp)
|
6
|
+
|
7
|
+
== Bugfixes
|
8
|
+
* Compatibility with ruby-debug (do ARGV.dup in bin/cucumber so it can restart ruby with same args) (Aslak Hellesøy)
|
7
9
|
|
8
10
|
== 0.1.16 2009-01-19
|
9
11
|
|
@@ -248,13 +250,12 @@ Tables used to define more examples after a scenario must now be prefixed. In En
|
|
248
250
|
And I have entered 70 into the calculator
|
249
251
|
When I press add
|
250
252
|
Then the result should be 120 on the screen
|
251
|
-
And the result class should be Fixnum
|
252
253
|
|
253
254
|
More Examples:
|
254
|
-
| input_1 | input_2 | button | output |
|
255
|
-
| 20 | 30 | add | 50 |
|
256
|
-
| 2 | 5 | add | 7 |
|
257
|
-
| 0 | 40 | add | 40 |
|
255
|
+
| input_1 | input_2 | button | output |
|
256
|
+
| 20 | 30 | add | 50 |
|
257
|
+
| 2 | 5 | add | 7 |
|
258
|
+
| 0 | 40 | add | 40 |
|
258
259
|
|
259
260
|
Languages that are not updated yet will have to use "More Examples" until we get the translations.
|
260
261
|
|
data/Manifest.txt
CHANGED
@@ -225,14 +225,6 @@ rails_generators/feature/USAGE
|
|
225
225
|
rails_generators/feature/feature_generator.rb
|
226
226
|
rails_generators/feature/templates/feature.erb
|
227
227
|
rails_generators/feature/templates/steps.erb
|
228
|
-
script/console
|
229
|
-
script/console.cmd
|
230
|
-
script/destroy
|
231
|
-
script/destroy.cmd
|
232
|
-
script/generate
|
233
|
-
script/generate.cmd
|
234
|
-
script/txt2html
|
235
|
-
script/txt2html.cmd
|
236
228
|
setup.rb
|
237
229
|
spec/cucumber/broadcaster_spec.rb
|
238
230
|
spec/cucumber/cli_spec.rb
|
data/bin/cucumber
CHANGED
@@ -8,10 +8,9 @@ Feature: Addition
|
|
8
8
|
And I have entered 70 into the calculator
|
9
9
|
When I press add
|
10
10
|
Then the result should be 120 on the screen
|
11
|
-
And the result class should be Fixnum
|
12
11
|
|
13
12
|
More Examples:
|
14
|
-
| input_1 | input_2 | output |
|
15
|
-
| 20 | 30 | 50 |
|
16
|
-
| 2 | 5 | 7 |
|
17
|
-
| 0 | 40 | 40 |
|
13
|
+
| input_1 | input_2 | output |
|
14
|
+
| 20 | 30 | 50 |
|
15
|
+
| 2 | 5 | 7 |
|
16
|
+
| 0 | 40 | 40 |
|
@@ -8,10 +8,9 @@ Funktionalität: Addition
|
|
8
8
|
Und ich habe 70 in den Taschenrechner eingegeben
|
9
9
|
Wenn ich add drücke
|
10
10
|
Dann sollte das Ergebniss auf dem Bildschirm 120 sein
|
11
|
-
Und die Ergebnissklasse sollte eine Fixnum sein
|
12
11
|
|
13
12
|
Mehr Beispiele:
|
14
|
-
| Eingabe_1 | Eingabe_2 | Knopf | Ausgabe |
|
15
|
-
| 20 | 30 | add | 50 |
|
16
|
-
| 2 | 5 | add | 7 |
|
17
|
-
| 0 | 40 | add | 40 |
|
13
|
+
| Eingabe_1 | Eingabe_2 | Knopf | Ausgabe |
|
14
|
+
| 20 | 30 | add | 50 |
|
15
|
+
| 2 | 5 | add | 7 |
|
16
|
+
| 0 | 40 | add | 40 |
|
@@ -22,11 +22,3 @@ end
|
|
22
22
|
Then /sollte das Ergebniss auf dem Bildschirm (.*) sein/ do |result|
|
23
23
|
@result.should == result.to_f
|
24
24
|
end
|
25
|
-
|
26
|
-
Then /die Ergebnissklasse sollte eine (\w*) sein/ do |class_name|
|
27
|
-
@result.class.name.should == class_name
|
28
|
-
end
|
29
|
-
|
30
|
-
Given /it should rain on (\w+)/ do |day|
|
31
|
-
@calc.rain?(day).should == true
|
32
|
-
end
|
@@ -8,10 +8,9 @@ Feature: Addition
|
|
8
8
|
And I have entered 70 into the calculator
|
9
9
|
When I press add
|
10
10
|
Then the result should be 120 on the screen
|
11
|
-
And the result class should be Fixnum
|
12
11
|
|
13
12
|
More Examples:
|
14
|
-
| input_1 | input_2 | button | output |
|
15
|
-
| 20 | 30 | add | 50 |
|
16
|
-
| 2 | 5 | add | 7 |
|
17
|
-
| 0 | 40 | add | 40 |
|
13
|
+
| input_1 | input_2 | button | output |
|
14
|
+
| 20 | 30 | add | 50 |
|
15
|
+
| 2 | 5 | add | 7 |
|
16
|
+
| 0 | 40 | add | 40 |
|
@@ -8,10 +8,9 @@ Omadus: Liitmine
|
|
8
8
|
Ja olen sisestanud kalkulaatorisse numbri 70
|
9
9
|
Kui ma vajutan liida
|
10
10
|
Siis vastuseks peab ekraanil kuvatama 120
|
11
|
-
Ja vastuseklass peab olema tüüpi Fixnum
|
12
11
|
|
13
12
|
More Examples:
|
14
|
-
| input_1 | input_2 | button | output |
|
15
|
-
| 20 | 30 | liida | 50 |
|
16
|
-
| 2 | 5 | liida | 7 |
|
17
|
-
| 0 | 40 | liida | 40 |
|
13
|
+
| input_1 | input_2 | button | output |
|
14
|
+
| 20 | 30 | liida | 50 |
|
15
|
+
| 2 | 5 | liida | 7 |
|
16
|
+
| 0 | 40 | liida | 40 |
|
@@ -8,10 +8,9 @@ Ominaisuus: Yhteenlasku
|
|
8
8
|
Ja että olen syöttänyt laskimeen luvun 70
|
9
9
|
Kun painan "summaa"
|
10
10
|
Niin laskimen ruudulla pitäisi näkyä tulos 120
|
11
|
-
Ja tuloksen luokan pitäisi olla Fixnum
|
12
11
|
|
13
12
|
Lisätapaukset:
|
14
|
-
| luku_1 | luku_2 | nappi | tulos |
|
15
|
-
| 20 | 30 | summaa | 50 |
|
16
|
-
| 2 | 5 | summaa | 7 |
|
17
|
-
| 0 | 40 | summaa | 40 |
|
13
|
+
| luku_1 | luku_2 | nappi | tulos |
|
14
|
+
| 20 | 30 | summaa | 50 |
|
15
|
+
| 2 | 5 | summaa | 7 |
|
16
|
+
| 0 | 40 | summaa | 40 |
|
@@ -8,10 +8,9 @@ Fitur: Addition
|
|
8
8
|
Dan aku sudah masukkan 70 ke kalkulator
|
9
9
|
Ketika aku tekan add
|
10
10
|
Maka hasilnya harus 120 di layar
|
11
|
-
Dan class hasilnya harus Fixnum
|
12
11
|
|
13
12
|
Contoh Tambahan:
|
14
|
-
| input_1 | input_2 | button | output |
|
15
|
-
| 20 | 30 | add | 50 |
|
16
|
-
| 2 | 5 | add | 7 |
|
17
|
-
| 0 | 40 | add | 40 |
|
13
|
+
| input_1 | input_2 | button | output |
|
14
|
+
| 20 | 30 | add | 50 |
|
15
|
+
| 2 | 5 | add | 7 |
|
16
|
+
| 0 | 40 | add | 40 |
|
@@ -22,12 +22,3 @@ end
|
|
22
22
|
Then /hasilnya harus (.*) di layar/ do |result|
|
23
23
|
@result.should == result.to_f
|
24
24
|
end
|
25
|
-
|
26
|
-
Then /class hasilnya harus (\w*)/ do |class_name|
|
27
|
-
@result.class.name.should == class_name
|
28
|
-
end
|
29
|
-
|
30
|
-
Given /it should rain on (\w+)/ do |day|
|
31
|
-
@calc.rain?(day).should == true
|
32
|
-
end
|
33
|
-
|
@@ -8,10 +8,9 @@
|
|
8
8
|
かつ 70 を入力
|
9
9
|
もし add ボタンを押した
|
10
10
|
ならば 結果は 120 を表示
|
11
|
-
かつ 結果のクラスは Fixnum
|
12
11
|
|
13
12
|
他のサンプル:
|
14
|
-
| 入力1 | 入力2 | 実行 | 表示 |
|
15
|
-
| 20 | 30 | add | 50 |
|
16
|
-
| 2 | 5 | add | 7 |
|
17
|
-
| 0 | 40 | add | 40 |
|
13
|
+
| 入力1 | 入力2 | 実行 | 表示 |
|
14
|
+
| 20 | 30 | add | 50 |
|
15
|
+
| 2 | 5 | add | 7 |
|
16
|
+
| 0 | 40 | add | 40 |
|
@@ -23,11 +23,3 @@ end
|
|
23
23
|
Then /結果は (.*) を表示/ do |result|
|
24
24
|
@result.should == result.to_f
|
25
25
|
end
|
26
|
-
|
27
|
-
Then /結果のクラスは (\w*)/ do |class_name|
|
28
|
-
@result.class.name.should == class_name
|
29
|
-
end
|
30
|
-
|
31
|
-
Given /it should rain on (\w+)/ do |day|
|
32
|
-
@calc.rain?(day).should == true
|
33
|
-
end
|
@@ -8,10 +8,9 @@
|
|
8
8
|
그리고 계산기에 70을 입력했음
|
9
9
|
만일 내가 add를 누루면
|
10
10
|
그러면 화면에 출력된 결과는 120이다
|
11
|
-
그리고 결과의 class는 Fixnum이다
|
12
11
|
|
13
12
|
다른 예:
|
14
|
-
| 입력1 | 입력2 | 버튼 | 결과 |
|
15
|
-
| 20 | 30 | add | 50 |
|
16
|
-
| 2 | 5 | add | 7 |
|
17
|
-
| 0 | 40 | add | 40 |
|
13
|
+
| 입력1 | 입력2 | 버튼 | 결과 |
|
14
|
+
| 20 | 30 | add | 50 |
|
15
|
+
| 2 | 5 | add | 7 |
|
16
|
+
| 0 | 40 | add | 40 |
|
@@ -8,10 +8,9 @@ Sąvybė: Sudėtis
|
|
8
8
|
Ir aš įvedžiau 70 į skaičiuotuvą
|
9
9
|
Kai aš paspaudžiu "add"
|
10
10
|
Tada rezultatas ekrane turi būti 120
|
11
|
-
Ir rezultato klasė turi būti "Fixnum"
|
12
11
|
|
13
12
|
Daugiau pavyzdžių
|
14
|
-
| įvestis_1 | įvestis_2 | mygtukas | išvestis |
|
15
|
-
| 20 | 30 | add | 50 |
|
16
|
-
| 2 | 5 | add | 7 |
|
17
|
-
| 0 | 40 | add | 40 |
|
13
|
+
| įvestis_1 | įvestis_2 | mygtukas | išvestis |
|
14
|
+
| 20 | 30 | add | 50 |
|
15
|
+
| 2 | 5 | add | 7 |
|
16
|
+
| 0 | 40 | add | 40 |
|
@@ -22,12 +22,3 @@ end
|
|
22
22
|
Then /rezultatas ekrane turi būti (.*)/ do |result|
|
23
23
|
@result.should == result.to_f
|
24
24
|
end
|
25
|
-
|
26
|
-
Then /rezultato klasė turi būti "(\w*)"/ do |class_name|
|
27
|
-
@result.class.name.should == class_name
|
28
|
-
end
|
29
|
-
|
30
|
-
Given /turi lyti (\w+)/ do |day|
|
31
|
-
@calc.rain?(day).should == true
|
32
|
-
end
|
33
|
-
|
data/lib/cucumber/version.rb
CHANGED
@@ -78,7 +78,7 @@ module Cucumber
|
|
78
78
|
p = FeatureParser.new
|
79
79
|
f = p.parse_feature(File.dirname(__FILE__) + '/multiple_tables.feature')
|
80
80
|
f.should have(6).scenarios
|
81
|
-
f.scenarios[0].should have(
|
81
|
+
f.scenarios[0].should have(4).steps
|
82
82
|
end
|
83
83
|
|
84
84
|
it "should allow empty features" do
|
@@ -8,13 +8,12 @@ Feature: Addition
|
|
8
8
|
And I have entered 70 into the calculator
|
9
9
|
When I press add
|
10
10
|
Then the result should be 120 on the screen
|
11
|
-
And the result class should be Fixnum
|
12
11
|
|
13
12
|
More Examples:
|
14
|
-
| input_1 | input_2 | button | output |
|
15
|
-
| 20 | 30 | add | 50 |
|
16
|
-
| 2 | 5 | add | 7 |
|
17
|
-
| 0 | 40 | add | 40 |
|
13
|
+
| input_1 | input_2 | button | output |
|
14
|
+
| 20 | 30 | add | 50 |
|
15
|
+
| 2 | 5 | add | 7 |
|
16
|
+
| 0 | 40 | add | 40 |
|
18
17
|
|
19
18
|
Scenario: Add three numbers
|
20
19
|
Given I have entered 25 into the calculator
|
@@ -22,8 +21,7 @@ Feature: Addition
|
|
22
21
|
And I have entered 13 into the calculator
|
23
22
|
When I press add
|
24
23
|
Then the result should be 50 on the screen
|
25
|
-
And the result class should be Fixnum
|
26
24
|
|
27
25
|
More Examples:
|
28
|
-
| input_1 | input_2 | input_3 | button | output |
|
29
|
-
| 1 | 2 | 3 | add | 6 |
|
26
|
+
| input_1 | input_2 | input_3 | button | output |
|
27
|
+
| 1 | 2 | 3 | add | 6 |
|
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.16.
|
4
|
+
version: 0.1.16.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aslak Helles\xC3\xB8y"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-01-
|
12
|
+
date: 2009-01-20 00:00:00 -08:00
|
13
13
|
default_executable: cucumber
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
data/script/console
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# File: script/console
|
3
|
-
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
-
|
5
|
-
libs = " -r irb/completion"
|
6
|
-
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
-
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
-
libs << " -r #{File.dirname(__FILE__) + '/../lib/cucumber.rb'}"
|
9
|
-
visit_feature "Loading cucumber gem"
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
data/script/console.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/console %*
|
data/script/destroy
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/destroy'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/destroy.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/destroy %*
|
data/script/generate
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/generate'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/script/generate.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/generate %*
|
data/script/txt2html
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
begin
|
5
|
-
require 'newgem'
|
6
|
-
rescue LoadError
|
7
|
-
puts "\n\nGenerating the website requires the newgem RubyGem"
|
8
|
-
puts "Install: gem install newgem\n\n"
|
9
|
-
exit(1)
|
10
|
-
end
|
11
|
-
require 'redcloth'
|
12
|
-
require 'syntax/convertors/html'
|
13
|
-
require 'erb'
|
14
|
-
require File.dirname(__FILE__) + '/../lib/cucumber/version.rb'
|
15
|
-
|
16
|
-
version = Cucumber::VERSION::STRING
|
17
|
-
download = 'http://rubyforge.org/projects/cucumber'
|
18
|
-
|
19
|
-
class Fixnum
|
20
|
-
def ordinal
|
21
|
-
# teens
|
22
|
-
return 'th' if (10..19).include?(self % 100)
|
23
|
-
# others
|
24
|
-
case self % 10
|
25
|
-
when 1: return 'st'
|
26
|
-
when 2: return 'nd'
|
27
|
-
when 3: return 'rd'
|
28
|
-
else return 'th'
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
class Time
|
34
|
-
def pretty
|
35
|
-
return "#{mday}#{mday.ordinal} #{strftime('%B')} #{year}"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def convert_syntax(syntax, source)
|
40
|
-
return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^<pre>|</pre>$!,'')
|
41
|
-
end
|
42
|
-
|
43
|
-
if ARGV.length >= 1
|
44
|
-
src, template = ARGV
|
45
|
-
template ||= File.join(File.dirname(__FILE__), '/../website/template.html.erb')
|
46
|
-
|
47
|
-
else
|
48
|
-
puts("Usage: #{File.split($0).last} source.txt [template.html.erb] > output.html")
|
49
|
-
exit!
|
50
|
-
end
|
51
|
-
|
52
|
-
template = ERB.new(File.open(template).read)
|
53
|
-
|
54
|
-
title = nil
|
55
|
-
body = nil
|
56
|
-
File.open(src) do |fsrc|
|
57
|
-
title_text = fsrc.readline
|
58
|
-
body_text = fsrc.read
|
59
|
-
syntax_items = []
|
60
|
-
body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)</\1>!m){
|
61
|
-
ident = syntax_items.length
|
62
|
-
element, syntax, source = $1, $2, $3
|
63
|
-
syntax_items << "<#{element} class='syntax'>#{convert_syntax(syntax, source)}</#{element}>"
|
64
|
-
"syntax-temp-#{ident}"
|
65
|
-
}
|
66
|
-
title = RedCloth.new(title_text).to_html.gsub(%r!<.*?>!,'').strip
|
67
|
-
body = RedCloth.new(body_text).to_html
|
68
|
-
body.gsub!(%r!(?:<pre><code>)?syntax-temp-(\d+)(?:</code></pre>)?!){ syntax_items[$1.to_i] }
|
69
|
-
end
|
70
|
-
stat = File.stat(src)
|
71
|
-
created = stat.ctime
|
72
|
-
modified = stat.mtime
|
73
|
-
|
74
|
-
$stdout << template.result(binding)
|
data/script/txt2html.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/txt2html %*
|