cucumber 2.0.0.rc.4 → 2.0.0.rc.5

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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/History.md +74 -52
  3. data/examples/i18n/ht/Rakefile +6 -0
  4. data/examples/i18n/ht/features/adisyon.feature +17 -0
  5. data/examples/i18n/ht/features/divizyon.feature +10 -0
  6. data/examples/i18n/ht/features/step_definitions/kalkilatris_steps.rb +25 -0
  7. data/examples/i18n/ht/lib/kalkilatris.rb +14 -0
  8. data/features/docs/cli/dry_run.feature +43 -0
  9. data/features/docs/cli/strict_mode.feature +24 -1
  10. data/features/docs/defining_steps/nested_steps.feature +49 -0
  11. data/features/docs/exception_in_after_step_hook.feature +1 -1
  12. data/features/docs/exception_in_around_hook.feature +80 -0
  13. data/features/docs/formatters/json_formatter.feature +65 -1
  14. data/features/docs/formatters/junit_formatter.feature +40 -0
  15. data/features/docs/{wire_protocol_erb.feature → wire_protocol/erb_configuration.feature} +2 -2
  16. data/features/docs/wire_protocol/handle_unexpected_response.feature +30 -0
  17. data/features/docs/wire_protocol/invoke_message.feature +216 -0
  18. data/features/docs/wire_protocol/readme.md +26 -0
  19. data/features/docs/wire_protocol/snippets_message.feature +51 -0
  20. data/features/docs/wire_protocol/step_matches_message.feature +81 -0
  21. data/features/docs/{wire_protocol_table_diffing.feature → wire_protocol/table_diffing.feature} +1 -0
  22. data/features/docs/{wire_protocol_tags.feature → wire_protocol/tags.feature} +1 -0
  23. data/features/docs/{wire_protocol_timeouts.feature → wire_protocol/timeouts.feature} +1 -0
  24. data/features/docs/work_in_progress.feature +1 -1
  25. data/features/docs/writing_support_code/around_hooks.feature +31 -0
  26. data/features/docs/writing_support_code/before_hook.feature +7 -3
  27. data/features/docs/writing_support_code/tagged_hooks.feature +44 -6
  28. data/features/lib/step_definitions/wire_steps.rb +18 -1
  29. data/features/lib/support/fake_wire_server.rb +10 -7
  30. data/lib/cucumber.rb +1 -3
  31. data/lib/cucumber/cli/options.rb +7 -0
  32. data/lib/cucumber/encoding.rb +5 -0
  33. data/lib/cucumber/errors.rb +8 -0
  34. data/lib/cucumber/filters/prepare_world.rb +13 -5
  35. data/lib/cucumber/formatter/console.rb +1 -1
  36. data/lib/cucumber/formatter/gherkin_formatter_adapter.rb +9 -6
  37. data/lib/cucumber/formatter/junit.rb +95 -0
  38. data/lib/cucumber/formatter/legacy_api/adapter.rb +39 -3
  39. data/lib/cucumber/platform.rb +1 -1
  40. data/lib/cucumber/project_initializer.rb +43 -0
  41. data/lib/cucumber/rb_support/rb_step_definition.rb +11 -2
  42. data/lib/cucumber/rb_support/rb_world.rb +2 -2
  43. data/lib/cucumber/rb_support/snippet.rb +1 -1
  44. data/lib/cucumber/rspec/doubles.rb +1 -1
  45. data/lib/cucumber/running_test_case.rb +115 -0
  46. data/lib/cucumber/runtime.rb +5 -1
  47. data/lib/cucumber/runtime/for_programming_languages.rb +2 -2
  48. data/lib/cucumber/runtime/support_code.rb +18 -8
  49. data/spec/cucumber/formatter/junit_spec.rb +212 -156
  50. data/spec/cucumber/formatter/legacy_api/adapter_spec.rb +89 -1
  51. data/spec/cucumber/formatter/pretty_spec.rb +13 -0
  52. data/spec/cucumber/project_initializer_spec.rb +87 -0
  53. data/spec/cucumber/rb_support/rb_step_definition_spec.rb +21 -3
  54. data/spec/cucumber/rb_support/snippet_spec.rb +6 -6
  55. data/spec/cucumber/running_test_case_spec.rb +83 -0
  56. data/spec/spec_helper.rb +1 -4
  57. metadata +35 -18
  58. data/bin/cuke +0 -60
  59. data/features/docs/report_called_undefined_steps.feature +0 -57
  60. data/features/docs/wire_protocol.feature +0 -337
  61. data/lib/cucumber/ast/facade.rb +0 -117
@@ -1,117 +0,0 @@
1
- require 'cucumber/runtime'
2
- require 'cucumber'
3
- require 'cucumber/multiline_argument'
4
- require 'cucumber/core/test/result'
5
-
6
- module Cucumber
7
- # Decorates the `Cucumber::Core::Test::Case` to look like the
8
- # Cucumber 1.3's `Cucumber::Ast::Scenario`.
9
- #
10
- # This is for backwards compatability in before / after hooks.
11
- module Ast
12
- class Facade
13
- def initialize(test_case)
14
- @test_case = test_case
15
- test_case.describe_source_to(self)
16
- end
17
-
18
- def feature(feature)
19
- @feature = feature
20
- end
21
-
22
- def scenario(scenario)
23
- @factory = Scenario
24
- end
25
-
26
- def scenario_outline(scenario)
27
- @factory = ScenarioOutlineExample
28
- end
29
-
30
- def examples_table(examples_table)
31
- end
32
-
33
- def examples_table_row(row)
34
- end
35
-
36
- def build_scenario
37
- @factory.new(@test_case, Feature.new(@feature.legacy_conflated_name_and_description))
38
- end
39
-
40
- class Scenario
41
- def initialize(test_case, feature, result = Core::Test::Result::Unknown.new)
42
- @test_case = test_case
43
- @feature = feature
44
- @result = result
45
- end
46
-
47
- def accept_hook?(hook)
48
- hook.tag_expressions.all? { |expression| @test_case.match_tags?(expression) }
49
- end
50
-
51
- def failed?
52
- @result.failed?
53
- end
54
-
55
- def passed?
56
- !failed?
57
- end
58
-
59
- def language
60
- @test_case.language
61
- end
62
-
63
- def feature
64
- @feature
65
- end
66
-
67
- def name
68
- "#{@test_case.keyword}: #{@test_case.name}"
69
- end
70
-
71
- def title
72
- warn("deprecated: call #name instead")
73
- name
74
- end
75
-
76
- def source_tags
77
- #warn('deprecated: call #tags instead')
78
- tags
79
- end
80
-
81
- def source_tag_names
82
- tags.map &:name
83
- end
84
-
85
- def skip_invoke!
86
- Cucumber.deprecate(self.class.name, __method__, "Call #skip_this_scenario on the World directly")
87
- raise Cucumber::Core::Test::Result::Skipped
88
- end
89
-
90
- def tags
91
- @test_case.tags
92
- end
93
-
94
- def outline?
95
- false
96
- end
97
-
98
- def with_result(result)
99
- self.class.new(@test_case, @feature, result)
100
- end
101
- end
102
-
103
- class ScenarioOutlineExample < Scenario
104
- def outline?
105
- true
106
- end
107
-
108
- def scenario_outline
109
- self
110
- end
111
- end
112
-
113
- Feature = Struct.new(:name)
114
-
115
- end
116
- end
117
- end