cucumber 0.4.4 → 0.4.5.rc1

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.
Files changed (90) hide show
  1. data/.gitignore +2 -1
  2. data/Caliper.yml +5 -0
  3. data/History.txt +24 -1
  4. data/Rakefile +1 -1
  5. data/VERSION.yml +2 -2
  6. data/cucumber.gemspec +18 -27
  7. data/cucumber.yml +10 -4
  8. data/examples/i18n/README.textile +1 -1
  9. data/examples/i18n/bg/features/consecutive_calculations.feature +1 -1
  10. data/examples/i18n/bg/features/division.feature +1 -1
  11. data/examples/i18n/en-lol/Rakefile +1 -3
  12. data/examples/i18n/en/features/division.feature +4 -4
  13. data/examples/i18n/et/features/jagamine.feature +1 -1
  14. data/examples/i18n/fr/features/addition2.feature +17 -0
  15. data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +13 -0
  16. data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +3 -3
  17. data/examples/i18n/lt/features/addition.feature +2 -2
  18. data/examples/i18n/lt/features/division.feature +1 -1
  19. data/examples/i18n/zh-CN/Rakefile +1 -3
  20. data/examples/i18n/zh-TW/Rakefile +1 -3
  21. data/examples/tcl/README.textile +11 -0
  22. data/examples/tcl/Rakefile +6 -0
  23. data/examples/tcl/features/fibonnacci.feature +17 -0
  24. data/examples/tcl/features/step_definitions/fib_steps.rb +7 -0
  25. data/examples/tcl/features/support/env.rb +6 -0
  26. data/examples/tcl/src/fib.tcl +3 -0
  27. data/examples/tickets/features/177/1.feature +3 -4
  28. data/examples/tickets/features/177/2.feature +2 -3
  29. data/examples/tickets/features/241.feature +2 -3
  30. data/examples/tickets/features/301/filter_background_tagged_hooks.feature +1 -1
  31. data/features/cucumber_cli.feature +4 -2
  32. data/features/custom_formatter.feature +32 -31
  33. data/features/html_formatter/a.html +319 -102
  34. data/features/language_help.feature +12 -14
  35. data/features/support/env.rb +1 -1
  36. data/features/transform.feature +17 -3
  37. data/gem_tasks/features.rake +3 -1
  38. data/lib/cucumber/ast/scenario_outline.rb +1 -1
  39. data/lib/cucumber/ast/step_invocation.rb +2 -2
  40. data/lib/cucumber/cli/configuration.rb +2 -17
  41. data/lib/cucumber/cli/language_help_formatter.rb +1 -1
  42. data/lib/cucumber/cli/options.rb +5 -4
  43. data/lib/cucumber/formatter/cucumber.css +198 -82
  44. data/lib/cucumber/formatter/cucumber.sass +173 -71
  45. data/lib/cucumber/formatter/html.rb +371 -195
  46. data/lib/cucumber/formatter/io.rb +33 -0
  47. data/lib/cucumber/formatter/junit.rb +16 -7
  48. data/lib/cucumber/formatter/pdf.rb +5 -5
  49. data/lib/cucumber/formatter/pretty.rb +6 -8
  50. data/lib/cucumber/formatter/progress.rb +4 -2
  51. data/lib/cucumber/formatter/rerun.rb +4 -2
  52. data/lib/cucumber/formatter/steps.rb +2 -2
  53. data/lib/cucumber/formatter/tag_cloud.rb +6 -2
  54. data/lib/cucumber/formatter/usage.rb +2 -2
  55. data/lib/cucumber/languages.yml +205 -281
  56. data/lib/cucumber/parser/feature.rb +348 -82
  57. data/lib/cucumber/parser/feature.tt +47 -11
  58. data/lib/cucumber/parser/i18n.tt +7 -17
  59. data/lib/cucumber/parser/natural_language.rb +45 -18
  60. data/lib/cucumber/rb_support/rb_transform.rb +1 -1
  61. data/lib/cucumber/step_mother.rb +2 -3
  62. data/lib/cucumber/webrat/element_locator.rb +9 -5
  63. data/spec/cucumber/cli/options_spec.rb +0 -3
  64. data/spec/cucumber/formatter/html_spec.rb +15 -2
  65. data/spec/cucumber/formatter/junit_spec.rb +3 -0
  66. data/spec/cucumber/treetop_parser/fit_scenario.feature +2 -2
  67. data/spec/cucumber/treetop_parser/given_scenario.feature +1 -1
  68. data/spec/cucumber/treetop_parser/multiple_tables.feature +2 -2
  69. data/spec/cucumber/treetop_parser/test_dos.feature +1 -1
  70. metadata +17 -26
  71. data/Manifest.txt +0 -0
  72. data/lib/cucumber/rails/action_controller.rb +0 -38
  73. data/lib/cucumber/rails/active_record.rb +0 -30
  74. data/lib/cucumber/rails/rspec.rb +0 -10
  75. data/lib/cucumber/rails/test_unit.rb +0 -9
  76. data/lib/cucumber/rails/world.rb +0 -30
  77. data/rails_generators/cucumber/USAGE +0 -11
  78. data/rails_generators/cucumber/cucumber_generator.rb +0 -117
  79. data/rails_generators/cucumber/templates/cucumber +0 -17
  80. data/rails_generators/cucumber/templates/cucumber.rake +0 -46
  81. data/rails_generators/cucumber/templates/cucumber_environment.rb +0 -30
  82. data/rails_generators/cucumber/templates/env.rb +0 -49
  83. data/rails_generators/cucumber/templates/paths.rb +0 -27
  84. data/rails_generators/cucumber/templates/spork_env.rb +0 -57
  85. data/rails_generators/cucumber/templates/version_check.rb +0 -31
  86. data/rails_generators/cucumber/templates/webrat_steps.rb +0 -241
  87. data/rails_generators/feature/USAGE +0 -12
  88. data/rails_generators/feature/feature_generator.rb +0 -40
  89. data/rails_generators/feature/templates/feature.erb +0 -31
  90. data/rails_generators/feature/templates/steps.erb +0 -14
data/.gitignore CHANGED
@@ -14,4 +14,5 @@ target
14
14
  *.tmproj
15
15
  examples/self_test/tmp
16
16
  .#*
17
- .idea
17
+ .idea
18
+ rerun.txt
@@ -0,0 +1,5 @@
1
+ ---
2
+ # Config for https://devver.net/caliper
3
+ file_globs_to_ignore:
4
+ - lib/rubygems/**/*
5
+ - lib/cucumber/parser/{common,feature,py_string,table}.rb
@@ -1,3 +1,25 @@
1
+ == In Git
2
+
3
+ === New features
4
+ * Added a Tcl example using Sam Stephenson's ruby-tcl (Aslak Hellesøy)
5
+ * Added * as a synonym for Given/When/Then/And/But (for all i18n languages). (#462 Aslak Hellesøy)
6
+ * The HTML formatter produces a much nicer report, with TextMate link integration. (Rob Aldred)
7
+
8
+ === Changed Features
9
+ * Per-word trailing-space setting for step keywords using '<'. See 'fr' in languages.yml for example. (#525 Gregory Hnatiuk)
10
+ * --language is deprecated and will be removed in 0.5.0: http://wiki.github.com/aslakhellesoy/cucumber/spoken-languages (Aslak Hellesøy)
11
+ * Formatters will no longer be passed File objects. They must use ensure_io, ensure_file or ensure_dir. (Aslak Hellesøy)
12
+
13
+ === Bugfixes
14
+ * Make #element_at / #table_at work on Webrat 0.6.0. This is now deprecated it in favour of #tableish from the cucumber-rails gem. (Aslak Hellesøy)
15
+ * JUnit formatter not handling multiline table steps inside Scenario Outlines (#538 Matt Wynne)
16
+ * Pending in scenario outline is red (#399 Matt Wynne)
17
+ * Allow optional step arguments to play happily with step transforms (Rob Holland)
18
+ * Regex escape the path when filtering the backtrace (Corey Donohoe & Simon Rozet)
19
+
20
+ === Removed Features
21
+ * All Rails-related code is in a separate gem: cucumber-rails. Install that if you're working with Rails. (#483 Aslak Hellesøy)
22
+
1
23
  == 0.4.4 2009-11-13
2
24
 
3
25
  What a bad day to make a release, but here goes.
@@ -7,7 +29,7 @@ What a bad day to make a release, but here goes.
7
29
  * Make 'I' optional in all webrat steps. (Gavin Hughes)
8
30
  * Make generated cucumber.rake work with a vendored gem (Alex Rothenberg)
9
31
  * Native support for ANSIColor on IronRuby via the iron-term-ansicolor gem (Will Green)
10
- * Call a bunch of steps from step definitions - also with tables or pystrings. Copy-paste friendly (Bodaniel Jeanes, Jack Chen, Aslak Hellesøy) TODO - WIKI DOCUMENTATION BEFORE RELEASE
32
+ * Call a bunch of steps from step definitions - also with tables or pystrings. Copy-paste friendly (Bodaniel Jeanes, Jack Chen, Aslak Hellesøy)
11
33
 
12
34
  === Bugfixes
13
35
  * Pretty printer fails when expanding scenario outlines with -x when the background includes a table (#515 Mike Sassak)
@@ -18,6 +40,7 @@ What a bad day to make a release, but here goes.
18
40
  * Added respond_to? when checking config.cache_classes for older Rails versions (Jeremy Durham)
19
41
 
20
42
  === Changed Features
43
+ * Rails support has been moved to the cucumber-rails gem (Dennis Blöte, Aslak Hellesøy) TODO - WIKI DOCUMENTATION BEFORE RELEASE
21
44
  * The code for Czech has changed from cz to cs. (deepj)
22
45
  * $cucumber_interrupted is now Cucumber.wants_to_quit - avoid global variable, which gives warnings. (Aslak Hellesøy)
23
46
  * Examples keyword without a colon is deprecated loudly. Gherkin will not recognize it at all. (Gherkin #30 Mike Sassak)
data/Rakefile CHANGED
@@ -22,7 +22,7 @@ begin
22
22
  gem.add_dependency 'builder', '2.1.2'
23
23
  gem.add_dependency 'diff-lcs', '1.1.2'
24
24
 
25
- gem.add_development_dependency 'nokogiri', '1.3.3'
25
+ gem.add_development_dependency 'nokogiri', '1.4.0'
26
26
  gem.add_development_dependency 'prawn', '0.5.1'
27
27
  gem.add_development_dependency 'rspec', '1.2.9'
28
28
  gem.add_development_dependency 'spork', '0.7.3'
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 4
2
+ :patch: 5
3
3
  :major: 0
4
4
  :minor: 4
5
- :build:
5
+ :build: rc1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cucumber}
8
- s.version = "0.4.4"
8
+ s.version = "0.4.5.rc1"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
10
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aslak Helles\303\270y"]
12
- s.date = %q{2009-11-13}
12
+ s.date = %q{2009-12-07}
13
13
  s.default_executable = %q{cucumber}
14
14
  s.description = %q{A BDD tool written in Ruby}
15
15
  s.email = %q{cukes@googlegroups.com}
@@ -21,9 +21,9 @@ Gem::Specification.new do |s|
21
21
  s.files = [
22
22
  ".gitattributes",
23
23
  ".gitignore",
24
+ "Caliper.yml",
24
25
  "History.txt",
25
26
  "LICENSE",
26
- "Manifest.txt",
27
27
  "README.rdoc",
28
28
  "Rakefile",
29
29
  "VERSION.yml",
@@ -89,6 +89,7 @@ Gem::Specification.new do |s|
89
89
  "examples/i18n/fi/lib/laskin.rb",
90
90
  "examples/i18n/fr/Rakefile",
91
91
  "examples/i18n/fr/features/addition.feature",
92
+ "examples/i18n/fr/features/addition2.feature",
92
93
  "examples/i18n/fr/features/step_definitions/calculatrice_steps.rb",
93
94
  "examples/i18n/fr/lib/calculatrice.rb",
94
95
  "examples/i18n/he/Rakefile",
@@ -270,6 +271,12 @@ Gem::Specification.new do |s|
270
271
  "examples/sinatra/views/layout.erb",
271
272
  "examples/steps_library/features/step_definitions/steps_lib1.rb",
272
273
  "examples/steps_library/features/step_definitions/steps_lib2.rb",
274
+ "examples/tcl/README.textile",
275
+ "examples/tcl/Rakefile",
276
+ "examples/tcl/features/fibonnacci.feature",
277
+ "examples/tcl/features/step_definitions/fib_steps.rb",
278
+ "examples/tcl/features/support/env.rb",
279
+ "examples/tcl/src/fib.tcl",
273
280
  "examples/test_unit/Rakefile",
274
281
  "examples/test_unit/features/step_definitions/test_unit_steps.rb",
275
282
  "examples/test_unit/features/test_unit.feature",
@@ -415,6 +422,7 @@ Gem::Specification.new do |s|
415
422
  "lib/cucumber/formatter/debug.rb",
416
423
  "lib/cucumber/formatter/duration.rb",
417
424
  "lib/cucumber/formatter/html.rb",
425
+ "lib/cucumber/formatter/io.rb",
418
426
  "lib/cucumber/formatter/junit.rb",
419
427
  "lib/cucumber/formatter/ordered_xml_markup.rb",
420
428
  "lib/cucumber/formatter/pdf.rb",
@@ -446,11 +454,6 @@ Gem::Specification.new do |s|
446
454
  "lib/cucumber/py_support/py_dsl.py",
447
455
  "lib/cucumber/py_support/py_language.py",
448
456
  "lib/cucumber/py_support/py_language.rb",
449
- "lib/cucumber/rails/action_controller.rb",
450
- "lib/cucumber/rails/active_record.rb",
451
- "lib/cucumber/rails/rspec.rb",
452
- "lib/cucumber/rails/test_unit.rb",
453
- "lib/cucumber/rails/world.rb",
454
457
  "lib/cucumber/rake/task.rb",
455
458
  "lib/cucumber/rb_support/rb_dsl.rb",
456
459
  "lib/cucumber/rb_support/rb_hook.rb",
@@ -473,20 +476,6 @@ Gem::Specification.new do |s|
473
476
  "lib/cucumber/wire_support/wire_packet.rb",
474
477
  "lib/cucumber/wire_support/wire_protocol.rb",
475
478
  "lib/cucumber/wire_support/wire_step_definition.rb",
476
- "rails_generators/cucumber/USAGE",
477
- "rails_generators/cucumber/cucumber_generator.rb",
478
- "rails_generators/cucumber/templates/cucumber",
479
- "rails_generators/cucumber/templates/cucumber.rake",
480
- "rails_generators/cucumber/templates/cucumber_environment.rb",
481
- "rails_generators/cucumber/templates/env.rb",
482
- "rails_generators/cucumber/templates/paths.rb",
483
- "rails_generators/cucumber/templates/spork_env.rb",
484
- "rails_generators/cucumber/templates/version_check.rb",
485
- "rails_generators/cucumber/templates/webrat_steps.rb",
486
- "rails_generators/feature/USAGE",
487
- "rails_generators/feature/feature_generator.rb",
488
- "rails_generators/feature/templates/feature.erb",
489
- "rails_generators/feature/templates/steps.erb",
490
479
  "spec/cucumber/ast/background_spec.rb",
491
480
  "spec/cucumber/ast/feature_element_spec.rb",
492
481
  "spec/cucumber/ast/feature_factory.rb",
@@ -547,7 +536,7 @@ Gem::Specification.new do |s|
547
536
 
548
537
  (::) U P G R A D I N G (::)
549
538
 
550
- Thank you for installing cucumber-0.4.4.
539
+ Thank you for installing cucumber-0.4.5.
551
540
  Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
552
541
  for important information about this release. Happy cuking!
553
542
 
@@ -691,6 +680,8 @@ for important information about this release. Happy cuking!
691
680
  "examples/sinatra/features/support/env.rb",
692
681
  "examples/steps_library/features/step_definitions/steps_lib1.rb",
693
682
  "examples/steps_library/features/step_definitions/steps_lib2.rb",
683
+ "examples/tcl/features/step_definitions/fib_steps.rb",
684
+ "examples/tcl/features/support/env.rb",
694
685
  "examples/test_unit/features/step_definitions/test_unit_steps.rb",
695
686
  "examples/tickets/features/229/tagged_hooks.rb",
696
687
  "examples/tickets/features/270/back.steps.rb",
@@ -720,7 +711,7 @@ for important information about this release. Happy cuking!
720
711
  s.add_runtime_dependency(%q<polyglot>, ["= 0.2.9"])
721
712
  s.add_runtime_dependency(%q<builder>, ["= 2.1.2"])
722
713
  s.add_runtime_dependency(%q<diff-lcs>, ["= 1.1.2"])
723
- s.add_development_dependency(%q<nokogiri>, ["= 1.3.3"])
714
+ s.add_development_dependency(%q<nokogiri>, ["= 1.4.0"])
724
715
  s.add_development_dependency(%q<prawn>, ["= 0.5.1"])
725
716
  s.add_development_dependency(%q<rspec>, ["= 1.2.9"])
726
717
  s.add_development_dependency(%q<spork>, ["= 0.7.3"])
@@ -730,7 +721,7 @@ for important information about this release. Happy cuking!
730
721
  s.add_dependency(%q<polyglot>, ["= 0.2.9"])
731
722
  s.add_dependency(%q<builder>, ["= 2.1.2"])
732
723
  s.add_dependency(%q<diff-lcs>, ["= 1.1.2"])
733
- s.add_dependency(%q<nokogiri>, ["= 1.3.3"])
724
+ s.add_dependency(%q<nokogiri>, ["= 1.4.0"])
734
725
  s.add_dependency(%q<prawn>, ["= 0.5.1"])
735
726
  s.add_dependency(%q<rspec>, ["= 1.2.9"])
736
727
  s.add_dependency(%q<spork>, ["= 0.7.3"])
@@ -741,7 +732,7 @@ for important information about this release. Happy cuking!
741
732
  s.add_dependency(%q<polyglot>, ["= 0.2.9"])
742
733
  s.add_dependency(%q<builder>, ["= 2.1.2"])
743
734
  s.add_dependency(%q<diff-lcs>, ["= 1.1.2"])
744
- s.add_dependency(%q<nokogiri>, ["= 1.3.3"])
735
+ s.add_dependency(%q<nokogiri>, ["= 1.4.0"])
745
736
  s.add_dependency(%q<prawn>, ["= 0.5.1"])
746
737
  s.add_dependency(%q<rspec>, ["= 1.2.9"])
747
738
  s.add_dependency(%q<spork>, ["= 0.7.3"])
@@ -1,4 +1,10 @@
1
- default: --format progress --strict features
2
- jruby: --format progress --tags ~@spork --strict features
3
- windows_mri: --format progress --tags ~@spork --strict features
4
- wip: --tags @wip --wip features
1
+ <%
2
+ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
+ rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format pretty #{rerun}"
4
+ std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip"
5
+ %>
6
+ default: <%= std_opts %>
7
+ jruby: <%= std_opts %>,~@spork
8
+ run_code_run: <%= std_opts %>,~@spork
9
+ windows_mri: <%= std_opts %>,~@spork
10
+ wip: --tags @wip:3 --wip features
@@ -15,4 +15,4 @@ h2. Running examples for a specific language
15
15
 
16
16
  Open a shell in the directory for the specific language and run
17
17
 
18
- <pre>rake features</pre>
18
+ <pre>rake cucumber</pre>
@@ -1,5 +1,5 @@
1
1
  # language: bg
2
- Функционалост: Последователни изчисления
2
+ Функционалност: Последователни изчисления
3
3
  За да не го правят наум
4
4
  Потребителите
5
5
  Трябва да могат да извършват последователни изчисления с калкулатора
@@ -1,5 +1,5 @@
1
1
  # language: bg
2
- Фунцкционалност: Делене на числа
2
+ Функционалност: Делене на числа
3
3
  За да не го правят наум
4
4
  Потребителите
5
5
  Трябва да могат да разделят числа с калкулатора
@@ -1,6 +1,4 @@
1
1
  $:.unshift(File.dirname(__FILE__) + '/../../../lib')
2
2
  require 'cucumber/rake/task'
3
3
 
4
- Cucumber::Rake::Task.new do |t|
5
- t.cucumber_opts = %w{--language en-lol}
6
- end
4
+ Cucumber::Rake::Task.new
@@ -4,7 +4,7 @@ Feature: Division
4
4
  Cashiers must be able to calculate a fraction
5
5
 
6
6
  Scenario: Regular numbers
7
- Given I have entered 3 into the calculator
8
- And I have entered 2 into the calculator
9
- When I press divide
10
- Then the result should be 1.5 on the screen
7
+ * I have entered 3 into the calculator
8
+ * I have entered 2 into the calculator
9
+ * I press divide
10
+ * the result should be 1.5 on the screen
@@ -3,7 +3,7 @@ Omadus: Jagamine
3
3
  Rumalate vigade vältimiseks
4
4
  Peavad kassapidajad saama arvutada murdudes
5
5
 
6
- Stsenaarium: Tavalised numrbid
6
+ Stsenaarium: Tavalised numbrid
7
7
  Eeldades et olen sisestanud kalkulaatorisse numbri 3
8
8
  Ja olen sisestanud kalkulaatorisse numbri 2
9
9
  Kui ma vajutan jaga
@@ -0,0 +1,17 @@
1
+ # language: fr
2
+ Fonctionnalité: Addition
3
+ Afin de financer mon bonus avec l'argent des pigeons
4
+ En tant que trader
5
+ Je souhaite pouvoir additionner 2 chiffres
6
+
7
+ Plan du Scénario: Addition de produits dérivés
8
+ Soit une calculatrice
9
+ Etant donné qu'on tape <a>
10
+ Et qu'on tape <b>
11
+ Lorsqu'on tape additionner
12
+ Alors le résultat doit être <somme>
13
+
14
+ Exemples:
15
+ | a | b | somme |
16
+ | 2 | 2 | 4 |
17
+ | 2 | 3 | 5 |
@@ -8,6 +8,10 @@ Soit /^une calculatrice$/ do
8
8
  @calc = Calculatrice.new
9
9
  end
10
10
 
11
+ Etantdonné /^qu'on tape (.*)$/ do |n|
12
+ @calc.push n.to_i
13
+ end
14
+
11
15
  Et /^que j'entre (\d+) pour le (.*) nombre/ do |n, x|
12
16
  @calc.push n.to_i
13
17
  end
@@ -16,10 +20,19 @@ Lorsque /^je tape sur la touche "="$/ do
16
20
  @expected_result = @calc.additionner
17
21
  end
18
22
 
23
+ Lorsqu /on tape additionner/ do
24
+ @expected_result = @calc.additionner
25
+ end
26
+
19
27
  Alors /le résultat affiché doit être (\d*)/ do |result|
20
28
  result.to_i.should == @expected_result
21
29
  end
22
30
 
31
+ Alors /le résultat doit être (\d*)/ do |result|
32
+ result.to_i.should == @expected_result
33
+ end
34
+
35
+
23
36
  Soit /^que je tape sur la touche "\+"$/ do
24
37
  # noop
25
38
  end
@@ -11,14 +11,14 @@ end
11
11
  After do
12
12
  end
13
13
 
14
- Given "$n を入力" do |n|
14
+ 前提 "$n を入力" do |n|
15
15
  @calc.push n.to_i
16
16
  end
17
17
 
18
- When /(\w+) を押した/ do |op|
18
+ もし /(\w+) を押した/ do |op|
19
19
  @result = @calc.send op
20
20
  end
21
21
 
22
- Then /(.*) を表示/ do |result|
22
+ ならば /(.*) を表示/ do |result|
23
23
  @result.should == result.to_f
24
24
  end
@@ -1,5 +1,5 @@
1
1
  # language: lt
2
- Sąvybė: Sudėtis
2
+ Savybė: Sudėtis
3
3
  Norint išvengti kvailų klaidų
4
4
  Kaip matematinis idiotas
5
5
  Aš noriu, kad man pasakytų dviejų skaičių sumą
@@ -10,7 +10,7 @@ Sąvybė: Sudėtis
10
10
  Kai aš paspaudžiu "<mygtukas>"
11
11
  Tada rezultatas ekrane turi būti <išvestis>
12
12
 
13
- Pavyzdžiai
13
+ Pavyzdžiai:
14
14
  | įvestis_1 | įvestis_2 | mygtukas | išvestis |
15
15
  | 20 | 30 | add | 50 |
16
16
  | 2 | 5 | add | 7 |
@@ -1,5 +1,5 @@
1
1
  # language: lt
2
- Feature: Dalyba
2
+ Savybė: Dalyba
3
3
  Norint išvengti klaidų
4
4
  Kasininkai privalo mokėti skaičiuoti trupmenas
5
5
 
@@ -1,6 +1,4 @@
1
1
  $:.unshift(File.dirname(__FILE__) + '/../../../lib')
2
2
  require 'cucumber/rake/task'
3
3
 
4
- Cucumber::Rake::Task.new do |t|
5
- t.cucumber_opts = %w{--language zh-CN}
6
- end
4
+ Cucumber::Rake::Task.new
@@ -1,6 +1,4 @@
1
1
  $:.unshift(File.dirname(__FILE__) + '/../../../lib')
2
2
  require 'cucumber/rake/task'
3
3
 
4
- Cucumber::Rake::Task.new do |t|
5
- t.cucumber_opts = %w{--language zh-TW}
6
- end
4
+ Cucumber::Rake::Task.new
@@ -0,0 +1,11 @@
1
+ h1. Cucumber goes Tcl
2
+
3
+ h2. Prerequisites
4
+
5
+ Install the ruby-tcl bindings:
6
+
7
+ [sudo] gem install --source http://gemcutter.org/ tcl
8
+
9
+ h2. Run the example:
10
+
11
+ rake cucumber
@@ -0,0 +1,6 @@
1
+ $:.unshift(File.dirname(__FILE__) + '/../../lib')
2
+ require 'cucumber/rake/task'
3
+
4
+ Cucumber::Rake::Task.new do |t|
5
+ t.cucumber_opts = %w{--format pretty}
6
+ end
@@ -0,0 +1,17 @@
1
+ Feature: Fibonacci
2
+ In order to calculate super fast fibonacci series
3
+ As a Tcl hacker
4
+ I want to use Tcl for that
5
+
6
+ Scenario Outline: Series
7
+ When I ask Tcl to calculate fibonacci for <n>
8
+ Then it should give me <result>
9
+ Examples:
10
+ | n | result |
11
+ | 1 | 1 |
12
+ | 2 | 1 |
13
+ | 3 | 2 |
14
+ | 4 | 3 |
15
+ | 5 | 5 |
16
+ | 6 | 8 |
17
+
@@ -0,0 +1,7 @@
1
+ When /^I ask Tcl to calculate fibonacci for (\d+)$/ do |n|
2
+ @fib_result = @fib.eval("fib #{n}").to_i
3
+ end
4
+
5
+ Then /^it should give me (\d+)$/ do |expected|
6
+ @fib_result.should == expected.to_i
7
+ end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+ require 'tcl'
3
+
4
+ Before do
5
+ @fib = Tcl::Interp.load_from_file(File.dirname(__FILE__) + '/../../src/fib.tcl')
6
+ end
@@ -0,0 +1,3 @@
1
+ proc fib {n} {
2
+ return [expr {$n<2 ? $n : [fib [expr $n-1]] + [fib [expr $n-2]]}]
3
+ }
@@ -1,7 +1,6 @@
1
- Users want to know that nobody can masquerade as them. We want to extend trust
2
- only to visitors who present the appropriate credentials. Everyone wants this
3
- identity verification to be as secure and convenient as possible.
4
-
1
+ # Users want to know that nobody can masquerade as them. We want to extend trust
2
+ # only to visitors who present the appropriate credentials. Everyone wants this
3
+ # identity verification to be as secure and convenient as possible.
5
4
  Feature: Logging in
6
5
  As an anonymous user with an account
7
6
  I want to log in to my account