cucumber 2.0.2 → 2.1.0

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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -6
  3. data/CONTRIBUTING.md +3 -1
  4. data/Gemfile +1 -1
  5. data/History.md +17 -0
  6. data/README.md +3 -3
  7. data/bin/cucumber +1 -2
  8. data/cucumber.gemspec +2 -2
  9. data/examples/i18n/ht/features/adisyon.feature +7 -7
  10. data/features/docs/api/listen_for_events.feature +58 -0
  11. data/features/docs/cli/fail_fast.feature +46 -0
  12. data/features/docs/defining_steps/nested_steps_with_second_arg.feature +3 -22
  13. data/features/docs/extending_cucumber/custom_formatter.feature +40 -4
  14. data/features/docs/gherkin/doc_strings.feature +5 -5
  15. data/features/docs/gherkin/language_help.feature +15 -15
  16. data/features/docs/gherkin/using_descriptions.feature +0 -5
  17. data/lib/cucumber/cli/configuration.rb +10 -92
  18. data/lib/cucumber/cli/main.rb +1 -7
  19. data/lib/cucumber/cli/options.rb +47 -12
  20. data/lib/cucumber/configuration.rb +195 -7
  21. data/lib/cucumber/events.rb +20 -0
  22. data/lib/cucumber/events/after_test_case.rb +25 -0
  23. data/lib/cucumber/events/after_test_step.rb +30 -0
  24. data/lib/cucumber/events/before_test_case.rb +18 -0
  25. data/lib/cucumber/events/before_test_step.rb +23 -0
  26. data/lib/cucumber/events/bus.rb +86 -0
  27. data/lib/cucumber/events/step_match.rb +23 -0
  28. data/lib/cucumber/filters/prepare_world.rb +2 -2
  29. data/lib/cucumber/formatter/backtrace_filter.rb +9 -8
  30. data/lib/cucumber/formatter/console.rb +1 -1
  31. data/lib/cucumber/formatter/event_bus_report.rb +37 -0
  32. data/lib/cucumber/formatter/fail_fast.rb +18 -0
  33. data/lib/cucumber/formatter/html.rb +1 -1
  34. data/lib/cucumber/formatter/io.rb +3 -1
  35. data/lib/cucumber/formatter/json.rb +19 -1
  36. data/lib/cucumber/formatter/legacy_api/adapter.rb +5 -13
  37. data/lib/cucumber/formatter/legacy_api/ast.rb +2 -2
  38. data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +3 -1
  39. data/lib/cucumber/formatter/pretty.rb +5 -7
  40. data/lib/cucumber/formatter/progress.rb +1 -1
  41. data/lib/cucumber/formatter/rerun.rb +1 -1
  42. data/lib/cucumber/formatter/steps.rb +1 -1
  43. data/lib/cucumber/formatter/usage.rb +12 -8
  44. data/lib/cucumber/gherkin/data_table_parser.rb +23 -0
  45. data/lib/cucumber/gherkin/formatter/ansi_escapes.rb +99 -0
  46. data/lib/cucumber/gherkin/formatter/argument.rb +17 -0
  47. data/lib/cucumber/gherkin/formatter/escaping.rb +17 -0
  48. data/lib/cucumber/gherkin/formatter/hashable.rb +27 -0
  49. data/lib/cucumber/gherkin/i18n.rb +15 -0
  50. data/lib/cucumber/gherkin/steps_parser.rb +41 -0
  51. data/lib/cucumber/language_support/language_methods.rb +6 -5
  52. data/lib/cucumber/multiline_argument.rb +0 -3
  53. data/lib/cucumber/multiline_argument/data_table.rb +6 -5
  54. data/lib/cucumber/multiline_argument/doc_string.rb +1 -2
  55. data/lib/cucumber/platform.rb +1 -1
  56. data/lib/cucumber/rake/task.rb +2 -2
  57. data/lib/cucumber/rb_support/rb_hook.rb +1 -6
  58. data/lib/cucumber/rb_support/rb_language.rb +15 -5
  59. data/lib/cucumber/rb_support/rb_step_definition.rb +11 -17
  60. data/lib/cucumber/rb_support/rb_world.rb +6 -4
  61. data/lib/cucumber/rb_support/regexp_argument_matcher.rb +2 -2
  62. data/lib/cucumber/runtime.rb +36 -16
  63. data/lib/cucumber/runtime/support_code.rb +19 -15
  64. data/lib/cucumber/step_definition_light.rb +5 -5
  65. data/lib/cucumber/step_definitions.rb +2 -2
  66. data/lib/cucumber/step_match.rb +11 -2
  67. data/lib/cucumber/wire_support/wire_protocol/requests.rb +2 -2
  68. data/lib/cucumber/wire_support/wire_step_definition.rb +4 -2
  69. data/{spec → lib}/simplecov_setup.rb +0 -0
  70. data/spec/cucumber/cli/configuration_spec.rb +2 -104
  71. data/spec/cucumber/cli/main_spec.rb +0 -22
  72. data/spec/cucumber/cli/options_spec.rb +3 -1
  73. data/spec/cucumber/configuration_spec.rb +123 -0
  74. data/spec/cucumber/events/bus_spec.rb +94 -0
  75. data/spec/cucumber/formatter/event_bus_report_spec.rb +79 -0
  76. data/spec/cucumber/formatter/fail_fast_spec.rb +88 -0
  77. data/spec/cucumber/formatter/json_spec.rb +43 -1
  78. data/spec/cucumber/formatter/rerun_spec.rb +4 -20
  79. data/spec/cucumber/rb_support/rb_step_definition_spec.rb +29 -0
  80. data/spec/cucumber/runtime_spec.rb +2 -28
  81. data/spec/spec_helper.rb +1 -1
  82. data/spec/support/standard_step_actions.rb +18 -0
  83. metadata +37 -13
  84. data/lib/cucumber/core_ext/proc.rb +0 -36
  85. data/spec/cucumber/core_ext/proc_spec.rb +0 -69
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54a19c3d70484ac7ded68c6ccf6a9b3b482598cc
4
- data.tar.gz: 359760639e06c251399202275219bb763b2de0b9
3
+ metadata.gz: 4396d10625822b4e94db4edbb67438e3e4394dae
4
+ data.tar.gz: 45960cc6f1cf3e3189dfd4f4ab5ac27c8ff8e4a3
5
5
  SHA512:
6
- metadata.gz: 4737148210ae32c40a5bba409f85cf4bf6c4312d2d2ddfc8812aae0476d14e0423271ed72ef35e6ad8e4ad93273f05acd915155d4e161c775ae6e71ed92819fe
7
- data.tar.gz: ef7867ae75f81da2e36ca1c45d5d27b24520ca176685532c64c5e8cc74933a700711e4ec3fb64313b194011bb8aa206f454fb22011a6a1aeef22b86ab819432e
6
+ metadata.gz: ac22570755b443d4f1cdb9a546d46f92283722d1cc799bb59274dd9cc476b0c609a471247ea7d1c7a2d8598d6d0d5e41c2efef49ce10b150e4337109d4cc998f
7
+ data.tar.gz: 125c07dddc5d0039333c677860a93820103871c9db3c3bba57d23496d4c07879208178c3a929d84c74bff15a14a4618cf7c12162c242d83e7b2533bc0261e357
@@ -10,9 +10,3 @@ branches:
10
10
  only:
11
11
  - master
12
12
  - v1.3.x-bugfix
13
-
14
- notifications:
15
- email:
16
- - cukes-devs@googlegroups.com
17
- irc:
18
- - "irc.freenode.org#cucumber"
@@ -60,7 +60,9 @@ Current release managers:
60
60
  * [Aslak Hellesøy](https://rubygems.org/profiles/aslakhellesoy)
61
61
  * [Oleg Sukhodolsky](https://rubygems.org/profiles/os97673)
62
62
  * [Steve Tooke](https://rubygems.org/profiles/tooky)
63
+ * [Björn Rasmusson](https://rubygems.org/profiles/brasmusson)
63
64
 
64
- To grant release karma, issue the following command:
65
+ To grant release karma, issue the following commands:
65
66
 
66
67
  gem owner cucumber --add <NEW OWNER RUBYGEMS EMAIL>
68
+ gem owner cucumber-core --add <NEW OWNER RUBYGEMS EMAIL>
data/Gemfile CHANGED
@@ -6,6 +6,6 @@ unless ENV['CUCUMBER_USE_RELEASED_CORE']
6
6
  if File.exist?(core_path) && !ENV['CUCUMBER_USE_GIT_CORE']
7
7
  gem 'cucumber-core', :path => core_path
8
8
  else
9
- gem 'cucumber-core', :git => "git://github.com/cucumber/cucumber-ruby-core.git"
9
+ gem 'cucumber-core', :git => "git://github.com/cucumber/cucumber-ruby-core.git", branch: "integrate-gherkin3-parser"
10
10
  end
11
11
  end
data/History.md CHANGED
@@ -1,5 +1,22 @@
1
1
  ## [In Git](https://github.com/cucumber/cucumber-ruby/compare/v2.0.2...master)
2
2
 
3
+ ### New Features
4
+
5
+ * Introduce EventBus ([903](https://github.com/cucumber/cucumber-ruby/pull/903) @mattwynne @tooky)
6
+ * Fail-fast CLI switch ([906](https://github.com/cucumber/cucumber-ruby/pull/906) @danascheider)
7
+
8
+ ### Bugfixes
9
+
10
+ * When only an around hook is failing, let the Json Formatter include the around hook result ([909](https://github.com/cucumber/cucumber-ruby/issues/909) @brasmusson).
11
+
12
+ ### Refactoring
13
+
14
+ * Coveralls badge switch to SVG ([897](https://github.com/cucumber/cucumber-ruby/pull/897) @nickmerwin)
15
+ * Moved simplecov_setup into lib folder ([896](https://github.com/cucumber/cucumber-ruby/pull/896) @tboerger)
16
+ * Pass DocString as String ([891](https://github.com/cucumber/cucumber-ruby/pull/891) @aslakhellesoy)
17
+ * Remove core_ext/proc.rb and use Proc#source_location instead ([888](https://github.com/cucumber/cucumber-ruby/pull/888) @brasmusson)
18
+ * Move behaviour from `Cucumber::Cli::Configuration` to `Cucumber::Configuration` (@tooky, @mattwynne)
19
+ * Integrate Gherkin3 parser ([884](https://github.com/cucumber/cucumber-ruby/pull/884) (@brassmusson)
3
20
 
4
21
  ## [v2.0.2](https://github.com/cucumber/cucumber-ruby/compare/v2.0.1...v2.0.2)
5
22
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Join the chat at https://gitter.im/cucumber/cucumber-ruby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cucumber/cucumber-ruby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://secure.travis-ci.org/cucumber/cucumber-ruby.png)](http://travis-ci.org/cucumber/cucumber-ruby) [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-ruby.png)](https://codeclimate.com/github/cucumber/cucumber-ruby) [![Coverage Status](https://coveralls.io/repos/cucumber/cucumber-ruby/badge.png?branch=master)](https://coveralls.io/r/cucumber/cucumber-ruby?branch=master) [![Dependency Status](https://gemnasium.com/cucumber/cucumber-ruby.png)](https://gemnasium.com/cucumber/cucumber-ruby)
1
+ [![Join the chat at https://gitter.im/cucumber/cucumber-ruby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cucumber/cucumber-ruby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://secure.travis-ci.org/cucumber/cucumber-ruby.png)](http://travis-ci.org/cucumber/cucumber-ruby) [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-ruby.png)](https://codeclimate.com/github/cucumber/cucumber-ruby) [![Coverage Status](https://coveralls.io/repos/cucumber/cucumber-ruby/badge.svg?branch=master)](https://coveralls.io/r/cucumber/cucumber-ruby?branch=master) [![Dependency Status](https://gemnasium.com/cucumber/cucumber-ruby.png)](https://gemnasium.com/cucumber/cucumber-ruby)
2
2
 
3
3
  # Cucumber
4
4
 
@@ -12,10 +12,10 @@ Where to get more info:
12
12
 
13
13
  * The main website: https://cucumber.io/
14
14
  * Documentation: https://github.com/cucumber/cucumber/wiki
15
- * Ruby API Documentation: http://www.rubydoc.info/github/cucumber/cucumber/
15
+ * Ruby API Documentation: http://www.rubydoc.info/github/cucumber/cucumber-ruby/
16
16
  * Support forum: https://groups.google.com/group/cukes
17
17
  * Developer chat: https://gitter.im/cucumber/cucumber-ruby
18
- * IRC channel: [irc://irc.freenode.net/cucumber](irc://irc.freenode.net/cucumber)
18
+ * User chat: https://gitter.im/cucumber/chat
19
19
 
20
20
  See [CONTRIBUTING.md](CONTRIBUTING.md) for info on contributing to Cucumber.
21
21
 
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
3
3
 
4
- load File.expand_path(File.dirname(__FILE__) + '/../spec/simplecov_setup.rb')
5
-
4
+ require 'simplecov_setup'
6
5
  require 'cucumber/rspec/disable_option_parser'
7
6
  require 'cucumber/cli/main'
8
7
  # The dup is to keep ARGV intact, so that tools like ruby-debug can respawn.
@@ -14,10 +14,10 @@ Gem::Specification.new do |s|
14
14
  s.platform = Gem::Platform::RUBY
15
15
  s.required_ruby_version = ">= 1.9.3"
16
16
 
17
- s.add_dependency 'cucumber-core', '~> 1.2.0'
17
+ s.add_dependency 'cucumber-core', '~> 1.3.0'
18
18
  s.add_dependency 'builder', '>= 2.1.2'
19
19
  s.add_dependency 'diff-lcs', '>= 1.1.3'
20
- s.add_dependency 'gherkin', '~> 2.12'
20
+ s.add_dependency 'gherkin3', '~> 3.1.0'
21
21
  s.add_dependency 'multi_json', '>= 1.7.5', '< 2.0'
22
22
  s.add_dependency 'multi_test', '>= 0.1.2'
23
23
 
@@ -1,14 +1,14 @@
1
1
  # language: ht
2
- Karakteristik: Adisyon
3
-    Nan lòd pou fè pou evite erè komik
4
-    Kòm yon moun sòt nan matematik
2
+ Karakteristik: Adisyon
3
+    Nan lòd pou fè pou evite erè komik
4
+    Kòm yon moun sòt nan matematik
5
5
     Mwen ta vle yo dim sòm total nan antre de nimero
6
6
 
7
7
  Plan Senaryo: ajoute de nimero
8
- Sipoze mwen te antre <input_1> nan kalkilatris la
9
- Epi mwen te antre <input_2> nan kalkilatris la
10
- Mwen peze <button>
11
- Rezilta a ta dwe <output> sou ekran an
8
+ Sipoze mwen te antre <input_1> nan kalkilatris la
9
+ Epi mwen te antre <input_2> nan kalkilatris la
10
+ mwen peze <button>
11
+ sa a rezilta a ta dwe <output> sou ekran an
12
12
 
13
13
  Egzanp:
14
14
  | input_1 | input_2 | button | output |
@@ -0,0 +1,58 @@
1
+ Feature: Listen for events
2
+
3
+ Scenario: Step Matched Event
4
+ Given a file named "features/test.feature" with:
5
+ """
6
+ Feature:
7
+ Scenario:
8
+ Given matching
9
+ """
10
+ And a file named "features/step_definitions/steps.rb" with:
11
+ """
12
+ Given(/matching/) do
13
+ end
14
+ """
15
+ And a file named "features/support/my_listener.rb" with:
16
+ """
17
+ AfterConfiguration do |config|
18
+ io = config.out_stream
19
+ config.on_event Cucumber::Events::StepMatch do |event|
20
+ io.puts "Success!"
21
+ io.puts "Event type: #{event.class}"
22
+ io.puts "Step name: #{event.test_step.name}"
23
+ io.puts "Source location: #{event.step_match.location}"
24
+ end
25
+ end
26
+ """
27
+ When I run `cucumber`
28
+ Then it should pass with:
29
+ """
30
+ Success!
31
+ Event type: Cucumber::Events::StepMatch
32
+ Step name: matching
33
+ Source location: features/step_definitions/steps.rb:1
34
+ """
35
+
36
+ Scenario: After Test Step event
37
+ Given a file named "features/test.feature" with:
38
+ """
39
+ Feature:
40
+ Scenario:
41
+ Given passing
42
+ """
43
+ And the standard step definitions
44
+ And a file named "features/support/my_listener.rb" with:
45
+ """
46
+ AfterConfiguration do |config|
47
+ io = config.out_stream
48
+ config.on_event Cucumber::Events::AfterTestStep do |event|
49
+ io.puts "YO"
50
+ end
51
+ end
52
+ """
53
+ When I run `cucumber`
54
+ Then it should pass with:
55
+ """
56
+ YO
57
+ """
58
+
@@ -0,0 +1,46 @@
1
+ @spawn
2
+ Feature: Fail fast
3
+
4
+ The --fail-fast flag causes Cucumber to exit immediately after the first
5
+ scenario fails.
6
+
7
+ Scenario: When a scenario fails
8
+ Given a file named "features/bad.feature" with:
9
+ """
10
+ Feature: Bad
11
+ Scenario: Failing
12
+ Given this step fails
13
+ """
14
+ And a file named "features/good.feature" with:
15
+ """
16
+ Feature: Good
17
+ Scenario: Passing
18
+ Given this step passes
19
+ """
20
+ And the standard step definitions
21
+ When I run `cucumber --fail-fast`
22
+ Then it should fail
23
+ And the output should contain:
24
+ """
25
+ 1 scenario (1 failed)
26
+ """
27
+
28
+ Scenario: When all the scenarios pass
29
+ Given a file named "features/first.feature" with:
30
+ """
31
+ Feature: first feature
32
+ Scenario: foo first
33
+ Given this step passes
34
+ Scenario: bar first
35
+ Given this step passes
36
+ """
37
+ And a file named "features/second.feature" with:
38
+ """
39
+ Feature: second
40
+ Scenario: foo second
41
+ Given this step passes
42
+ Scenario: bar second
43
+ Given this step passes
44
+ """
45
+ When I run `cucumber --fail-fast`
46
+ Then it should pass
@@ -34,7 +34,7 @@ Feature: Nested Steps with either table or doc string
34
34
 
35
35
  """
36
36
 
37
- Scenario: Use #step with docstring
37
+ Scenario: Use #step with Doc String
38
38
  Given a step definition that looks like this:
39
39
  """ruby
40
40
  Given /two turtles/ do
@@ -44,30 +44,11 @@ Feature: Nested Steps with either table or doc string
44
44
  And a step definition that looks like this:
45
45
  """ruby
46
46
  Given /turtles:/ do |text|
47
- puts text
47
+ puts "#{text}:#{text.class}"
48
48
  end
49
49
  """
50
50
  When I run the feature with the progress formatter
51
51
  Then the output should contain:
52
52
  """
53
- Sturm and Lioville
54
- """
55
-
56
- Scenario: Use #step with docstring and content-type
57
- Given a step definition that looks like this:
58
- """ruby
59
- Given /two turtles/ do
60
- step %{turtles:}, doc_string('Sturm and Lioville','math')
61
- end
62
- """
63
- And a step definition that looks like this:
64
- """ruby
65
- Given /turtles:/ do |text|
66
- puts text.content_type
67
- end
68
- """
69
- When I run the feature with the progress formatter
70
- Then the output should contain:
71
- """
72
- math
53
+ Sturm and Lioville:String
73
54
  """
@@ -9,13 +9,47 @@ Feature: Custom Formatter
9
9
  """
10
10
  And the standard step definitions
11
11
 
12
- Scenario: Use the new API
12
+ Scenario: Subscribe to result events
13
+
14
+ This is the recommended way to format output.
15
+
13
16
  Given a file named "features/support/custom_formatter.rb" with:
14
17
  """
15
18
  module MyCustom
16
19
  class Formatter
17
- def initialize(runtime, io, options)
18
- @io = io
20
+ def initialize(config)
21
+ @io = config.out_stream
22
+ config.on_event Cucumber::Events::BeforeTestCase do |event|
23
+ print_test_case_name(event.test_case)
24
+ end
25
+ end
26
+
27
+ def print_test_case_name(test_case)
28
+ feature = test_case.source.first
29
+ scenario = test_case.source.last
30
+ @io.puts feature.short_name.upcase
31
+ @io.puts " #{scenario.name.upcase}"
32
+ end
33
+ end
34
+ end
35
+ """
36
+ When I run `cucumber features/f.feature --format MyCustom::Formatter`
37
+ Then it should pass with exactly:
38
+ """
39
+ I'LL USE MY OWN
40
+ JUST PRINT ME
41
+
42
+ """
43
+
44
+ Scenario: Implement v2.0 formatter methods
45
+ Note that this method is likely to be deprecated in favour of events - see above.
46
+
47
+ Given a file named "features/support/custom_formatter.rb" with:
48
+ """
49
+ module MyCustom
50
+ class Formatter
51
+ def initialize(config)
52
+ @io = config.out_stream
19
53
  end
20
54
 
21
55
  def before_test_case(test_case)
@@ -36,6 +70,8 @@ Feature: Custom Formatter
36
70
  """
37
71
 
38
72
  Scenario: Use the legacy API
73
+ This is deprecated and should no longer be used.
74
+
39
75
  Given a file named "features/support/custom_legacy_formatter.rb" with:
40
76
  """
41
77
  module MyCustom
@@ -62,7 +98,7 @@ Feature: Custom Formatter
62
98
 
63
99
  """
64
100
 
65
- Scenario: Use both
101
+ Scenario: Use both old and new
66
102
  You can use a specific shim to opt-in to both APIs at once.
67
103
 
68
104
  Given a file named "features/support/custom_mixed_formatter.rb" with:
@@ -53,22 +53,22 @@ Feature: Doc strings
53
53
  Three
54
54
  """
55
55
 
56
- Scenario: DocString with interesting content type
56
+ Scenario: DocString passed as String
57
57
  Given a scenario with a step that looks like this:
58
58
  """gherkin
59
59
  Given I have some code for you:
60
- \"\"\"ruby
61
- # hello
60
+ \"\"\"
61
+ hello
62
62
  \"\"\"
63
63
  """
64
64
  And a step definition that looks like this:
65
65
  """ruby
66
66
  Given /code/ do |text|
67
- puts text.content_type
67
+ puts text.class
68
68
  end
69
69
  """
70
70
  When I run the feature with the progress formatter
71
71
  Then the output should contain:
72
72
  """
73
- ruby
73
+ String
74
74
  """
@@ -14,21 +14,21 @@ Feature: Language help
14
14
  When I run `cucumber --i18n pt help`
15
15
  Then it should pass with:
16
16
  """
17
- | feature | "Funcionalidade", "Característica", "Caracteristica" |
18
- | background | "Contexto", "Cenário de Fundo", "Cenario de Fundo", "Fundo" |
19
- | scenario | "Cenário", "Cenario" |
20
- | scenario_outline | "Esquema do Cenário", "Esquema do Cenario", "Delineação do Cenário", "Delineacao do Cenario" |
21
- | examples | "Exemplos", "Cenários", "Cenarios" |
22
- | given | "* ", "Dado ", "Dada ", "Dados ", "Dadas " |
23
- | when | "* ", "Quando " |
24
- | then | "* ", "Então ", "Entao " |
25
- | and | "* ", "E " |
26
- | but | "* ", "Mas " |
27
- | given (code) | "Dado", "Dada", "Dados", "Dadas" |
28
- | when (code) | "Quando" |
29
- | then (code) | "Então", "Entao" |
30
- | and (code) | "E" |
31
- | but (code) | "Mas" |
17
+ | feature | "Funcionalidade", "Característica", "Caracteristica" |
18
+ | background | "Contexto", "Cenário de Fundo", "Cenario de Fundo", "Fundo" |
19
+ | scenario | "Cenário", "Cenario" |
20
+ | scenario_outline | "Esquema do Cenário", "Esquema do Cenario", "Delineação do Cenário", "Delineacao do Cenario" |
21
+ | examples | "Exemplos", "Cenários", "Cenarios" |
22
+ | given | "* ", "Dado ", "Dada ", "Dados ", "Dadas " |
23
+ | when | "* ", "Quando " |
24
+ | then | "* ", "Então ", "Entao " |
25
+ | and | "* ", "E " |
26
+ | but | "* ", "Mas " |
27
+ | given (code) | "Dado", "Dada", "Dados", "Dadas" |
28
+ | when (code) | "Quando" |
29
+ | then (code) | "Então", "Entao" |
30
+ | and (code) | "E" |
31
+ | but (code) | "Mas" |
32
32
 
33
33
  """
34
34
 
@@ -54,28 +54,23 @@ Feature: Using descriptions to give features context
54
54
  Then it should pass with exactly:
55
55
  """
56
56
  Feature: descriptions everywhere
57
-
58
57
  We can put a useful description here of the feature, which can
59
58
  span multiple lines.
60
59
 
61
60
  Background:
62
-
63
61
  We can also put in descriptions showing what the background is
64
62
  doing.
65
63
  Given this step passes
66
64
 
67
65
  Scenario: I'm a scenario with a description
68
-
69
66
  You can also put descriptions in front of individual scenarios.
70
67
  Given this step passes
71
68
 
72
69
  Scenario Outline: I'm a scenario outline with a description
73
-
74
70
  Scenario outlines can have descriptions.
75
71
  Given this step <state>
76
72
 
77
73
  Examples: Examples
78
-
79
74
  Specific examples for an outline are allowed to have
80
75
  descriptions, too.
81
76
  | state |