cucumber 2.0.0.beta.3 → 2.0.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/History.md +20 -3
  3. data/cucumber.gemspec +2 -1
  4. data/examples/tcl/features/step_definitions/fib_steps.rb +1 -1
  5. data/features/docs/extending_cucumber/custom_formatter.feature +65 -7
  6. data/features/docs/formatters/debug_formatter.feature +24 -17
  7. data/features/docs/formatters/pretty_formatter.feature +42 -0
  8. data/features/docs/formatters/rerun_formatter.feature +3 -2
  9. data/lib/cucumber/cli/configuration.rb +3 -7
  10. data/lib/cucumber/cli/main.rb +1 -1
  11. data/lib/cucumber/{runtime → filters}/gated_receiver.rb +5 -1
  12. data/lib/cucumber/filters/quit.rb +24 -0
  13. data/lib/cucumber/filters/randomizer.rb +36 -0
  14. data/lib/cucumber/filters/tag_limits.rb +40 -0
  15. data/lib/cucumber/{runtime → filters}/tag_limits/test_case_index.rb +4 -2
  16. data/lib/cucumber/{runtime → filters}/tag_limits/verifier.rb +4 -2
  17. data/lib/cucumber/formatter/console.rb +2 -2
  18. data/lib/cucumber/formatter/debug.rb +1 -8
  19. data/lib/cucumber/formatter/fanout.rb +27 -0
  20. data/lib/cucumber/formatter/gherkin_formatter_adapter.rb +1 -3
  21. data/lib/cucumber/formatter/html.rb +12 -4
  22. data/lib/cucumber/formatter/ignore_missing_messages.rb +20 -0
  23. data/lib/cucumber/formatter/junit.rb +2 -2
  24. data/lib/cucumber/formatter/legacy_api/adapter.rb +1008 -0
  25. data/lib/cucumber/formatter/legacy_api/ast.rb +374 -0
  26. data/lib/cucumber/formatter/legacy_api/results.rb +51 -0
  27. data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +30 -0
  28. data/lib/cucumber/formatter/pretty.rb +4 -0
  29. data/lib/cucumber/formatter/rerun.rb +14 -88
  30. data/lib/cucumber/language_support/language_methods.rb +0 -54
  31. data/lib/cucumber/multiline_argument/data_table.rb +3 -4
  32. data/lib/cucumber/platform.rb +1 -1
  33. data/lib/cucumber/runtime.rb +41 -107
  34. data/spec/cucumber/{runtime → filters}/gated_receiver_spec.rb +3 -3
  35. data/spec/cucumber/{runtime → filters}/tag_limits/test_case_index_spec.rb +3 -3
  36. data/spec/cucumber/{runtime → filters}/tag_limits/verifier_spec.rb +4 -4
  37. data/spec/cucumber/{runtime/tag_limits/filter_spec.rb → filters/tag_limits_spec.rb} +6 -6
  38. data/spec/cucumber/formatter/debug_spec.rb +39 -530
  39. data/spec/cucumber/formatter/html_spec.rb +56 -0
  40. data/spec/cucumber/formatter/legacy_api/adapter_spec.rb +1902 -0
  41. data/spec/cucumber/formatter/pretty_spec.rb +128 -0
  42. data/spec/cucumber/formatter/rerun_spec.rb +106 -0
  43. data/spec/cucumber/formatter/spec_helper.rb +6 -2
  44. data/spec/cucumber/rb_support/rb_language_spec.rb +2 -2
  45. data/spec/cucumber/rb_support/rb_step_definition_spec.rb +1 -1
  46. data/spec/cucumber/runtime_spec.rb +1 -5
  47. data/spec/spec_helper.rb +2 -0
  48. metadata +44 -29
  49. data/features/docs/extending_cucumber/formatter_callbacks.feature +0 -370
  50. data/features/docs/output_from_hooks.feature +0 -128
  51. data/lib/cucumber/reports/legacy_formatter.rb +0 -1349
  52. data/lib/cucumber/runtime/results.rb +0 -64
  53. data/lib/cucumber/runtime/tag_limits.rb +0 -15
  54. data/lib/cucumber/runtime/tag_limits/filter.rb +0 -31
  55. data/spec/cucumber/reports/legacy_formatter_spec.rb +0 -1860
  56. data/spec/cucumber/runtime/results_spec.rb +0 -88
@@ -1,88 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module Cucumber
4
- describe Runtime::Results do
5
-
6
- let(:configuration) {double 'Configuration', :strict? => false}
7
- let(:passed_scenario) {double 'Scenario', :status => :passed}
8
- let(:failed_scenario) {double 'Scenario', :status => :failed}
9
- let(:passed_step) {double 'Step', :status => :passed}
10
- let(:failed_step) {double 'Step', :status => :failed}
11
- let(:pending_step) {double 'Step', :status => :pending}
12
- let(:undefined_step) {double 'Step', :status => :undefined}
13
-
14
- subject {described_class.new(configuration)}
15
-
16
- describe '#failure?' do
17
- context 'feature is not work in progress' do
18
- before do
19
- allow(configuration).to receive(:wip?) { false }
20
- end
21
-
22
- it 'returns true if a scenario failed' do
23
- subject.scenario_visited(passed_scenario)
24
- subject.scenario_visited(failed_scenario)
25
-
26
- expect(subject).to be_failure
27
- end
28
-
29
- it 'returns true if a step failed' do
30
- subject.step_visited(failed_step)
31
-
32
- expect(subject).to be_failure
33
- end
34
-
35
- it 'returns false if there are no scenarios' do
36
- expect(subject).not_to be_failure
37
- end
38
-
39
- it 'returns false if all scenarios passed' do
40
- subject.scenario_visited(passed_scenario)
41
- subject.scenario_visited(passed_scenario)
42
-
43
- expect(subject).not_to be_failure
44
- end
45
-
46
- context 'configuration is strict' do
47
- before do
48
- allow(configuration).to receive(:strict?) { true }
49
- end
50
-
51
- it 'returns true if a step is pending' do
52
- subject.step_visited(pending_step)
53
-
54
- expect(subject).to be_failure
55
- end
56
-
57
- it 'returns true if a step is undefined' do
58
- subject.step_visited(undefined_step)
59
-
60
- expect(subject).to be_failure
61
- end
62
- end
63
- end
64
-
65
- context 'feature is work in progress' do
66
- before do
67
- allow(configuration).to receive(:wip?) { true }
68
- end
69
-
70
- it 'returns true if a scenario passed' do
71
- subject.scenario_visited(passed_scenario)
72
-
73
- expect(subject).to be_failure
74
- end
75
-
76
- it 'returns false if there are no scenarios' do
77
- expect(subject).not_to be_failure
78
- end
79
-
80
- it 'returns false if all scenarios fail' do
81
- subject.scenario_visited(failed_scenario)
82
-
83
- expect(subject).not_to be_failure
84
- end
85
- end
86
- end
87
- end
88
- end