Skip to content

Commit 1f75d69

Browse files
Replace existing feature with the noruba ones
1 parent 11b7fd4 commit 1f75d69

File tree

135 files changed

+168
-7814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+168
-7814
lines changed

.circleci/config.yml

+1-20
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ commands:
3939
- run:
4040
name: run tests
4141
command: |
42-
bundle exec rspec
43-
bundle exec cucumber
44-
cd noruba
45-
bundle exec cucumber
46-
cd ..
47-
bundle exec rubocop
42+
bundle exec rake
4843
4944
test_allow_failure:
5045
description: "Run tests (allow failure so workflow is not marked as failed)"
@@ -67,21 +62,8 @@ jobs:
6762
name: run tests
6863
command: |
6964
bundle exec rspec
70-
bundle exec cucumber --retry 8 --no-strict-flaky
71-
72-
build_windows_noruba:
73-
executor: win/default
74-
working_directory: ~/repo
75-
steps:
76-
- add_windows_dependencies
77-
- build
78-
- run:
79-
name: run tests
80-
command: |
81-
cd noruba
8265
bundle exec cucumber
8366
84-
8567
build-ruby-2_3:
8668
docker:
8769
- image: circleci/ruby:2.3
@@ -210,7 +192,6 @@ workflows:
210192
build:
211193
jobs:
212194
- build_windows
213-
- build_windows_noruba
214195
- build-ruby-2_3
215196
- build-ruby-2_4
216197
- build-ruby-2_5

features/docs/api/list_step_defs_as_json.feature

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@spawn
21
Feature: List step defs as json
32

43
In order to build tools on top of Cucumber
@@ -17,11 +16,13 @@ Feature: List step defs as json
1716
And a file named "list_step_definitions.rb" with:
1817
"""
1918
require 'cucumber'
20-
puts Cucumber::StepDefinitions.new.to_json
21-
19+
File.open('steps.json', 'w') do |file|
20+
file.write Cucumber::StepDefinitions.new.to_json
21+
end
2222
"""
2323
When I run `bundle exec ruby list_step_definitions.rb`
24-
Then it should pass with JSON:
24+
Then it should pass
25+
And file "steps.json" should contain JSON:
2526
"""
2627
[
2728
{
@@ -44,10 +45,13 @@ Feature: List step defs as json
4445
And a file named "list_step_definitions.rb" with:
4546
"""
4647
require 'cucumber'
47-
puts Cucumber::StepDefinitions.new(:autoload_code_paths => ['my_weird']).to_json
48+
File.open('steps.json', 'w') do |file|
49+
file.write Cucumber::StepDefinitions.new(:autoload_code_paths => ['my_weird']).to_json
50+
end
4851
"""
4952
When I run `bundle exec ruby list_step_definitions.rb`
50-
Then it should pass with JSON:
53+
Then it should pass
54+
And file "steps.json" should contain JSON:
5155
"""
5256
[
5357
{

features/docs/api/run_cli_main_with_existing_runtime.feature

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@spawn
21
Feature: Run Cli::Main with existing Runtime
32

43
This is the API that Spork uses. It creates an existing runtime.

features/docs/cli/fail_fast.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@spawn
1+
@disable_fail_fast
22
Feature: Fail fast
33

44
The --fail-fast flag causes Cucumber to exit immediately after the first

features/docs/cli/randomize.feature

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Feature: Randomize
5757
When I run `cucumber`
5858
Then it should pass
5959

60-
@spawn
60+
@global_state
6161
Scenario: Run scenarios randomized
6262
When I run `cucumber --order random:41544 -q`
6363
Then it should fail
@@ -98,15 +98,15 @@ Feature: Randomize
9898
4 steps (2 failed, 2 passed)
9999
100100
Randomized with seed 41544
101-
102101
"""
103102

103+
@force_legacy_loader
104104
Scenario: Rerun scenarios randomized
105105
When I run `cucumber --order random --format summary`
106106
And I rerun the previous command with the same seed
107107
Then the output of both commands should be the same
108108

109-
@spawn
109+
@global_state
110110
Scenario: Run scenarios randomized with some skipped
111111
When I run `cucumber --tags "not @skipme" --order random:41544 -q`
112112
Then it should fail with exactly:

features/docs/cli/retry_failing_tests.feature

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ Feature: Retry failing tests
2828
Fails-forever ✗
2929
Fails-forever ✗
3030
31-
Solid
32-
Solid ✓
33-
3431
Fails-once feature
3532
Fails-once ✗
3633
Fails-once ✓
3734
3835
Fails-twice feature
3936
Fails-twice ✗
4037
Fails-twice ✗
38+
39+
Solid
40+
Solid ✓
4141
"""
4242

4343
Scenario: Retry twice, so Fails-twice starts to pass too
@@ -54,9 +54,6 @@ Feature: Retry failing tests
5454
Fails-forever ✗
5555
Fails-forever ✗
5656
57-
Solid
58-
Solid ✓
59-
6057
Fails-once feature
6158
Fails-once ✗
6259
Fails-once ✓
@@ -65,6 +62,9 @@ Feature: Retry failing tests
6562
Fails-twice ✗
6663
Fails-twice ✗
6764
Fails-twice ✓
65+
66+
Solid
67+
Solid ✓
6868
"""
6969

7070
Scenario: Flaky scenarios gives exit code zero in non-strict mode
@@ -90,8 +90,8 @@ Feature: Retry failing tests
9090
Then it should fail with:
9191
"""
9292
Flaky Scenarios:
93-
cucumber features/fails_once.feature:2
94-
cucumber features/fails_twice.feature:2
93+
cucumber features/fails-once_feature.feature:2
94+
cucumber features/fails-twice_feature.feature:2
9595
9696
3 scenarios (2 flaky, 1 passed)
9797
"""

features/docs/cli/specifying_multiple_formatters.feature

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@spawn
21
Feature: Running multiple formatters
32

43
When running cucumber, you are able to using multiple different

features/docs/defining_steps/nested_steps.feature

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Feature: Nested Steps
103103
Liouville
104104
"""
105105

106-
@spawn @todo-jruby @wip-jruby
106+
@todo-jruby @wip-jruby
107107
Scenario: Backtrace doesn't skip nested steps
108108
Given a file named "features/nested_steps.feature" with:
109109
"""gherkin
@@ -112,7 +112,7 @@ Feature: Nested Steps
112112
Scenario: Test Scenario 1
113113
Given two turtles
114114
"""
115-
Given a step definition that looks like this:
115+
Given a file named "features/step_definitions/step_definition.rb" with:
116116
"""ruby
117117
Given /two turtles/ do
118118
step "I have a couple turtles"
@@ -124,8 +124,8 @@ Feature: Nested Steps
124124
Then it should fail with:
125125
"""
126126
error (RuntimeError)
127-
./features/step_definitions/steps2.rb:5:in `/I have a couple turtles/'
128-
./features/step_definitions/steps2.rb:2:in `/two turtles/'
127+
./features/step_definitions/step_definition.rb:5:in `/I have a couple turtles/'
128+
./features/step_definitions/step_definition.rb:2:in `/two turtles/'
129129
features/nested_steps.feature:4:in `two turtles'
130130
131131
Failing Scenarios:

features/docs/defining_steps/printing_messages.feature

+9-11
Original file line numberDiff line numberDiff line change
@@ -75,48 +75,46 @@ Feature: Pretty formatter - Printing messages
7575
Given I log the world
7676
"""
7777

78-
# Don't know why, but we need to spawn this for JRuby otherwise it gives wierd errors
79-
@spawn
8078
Scenario: Delayed messages feature
8179
When I run `cucumber --quiet --format pretty features/f.feature`
8280
Then the stderr should not contain anything
8381
And the output should contain:
8482
"""
85-
Feature:
83+
Feature:
8684
87-
Scenario:
85+
Scenario:
8886
Given I use log with text "Ann"
8987
Ann
9088
And this step passes
9189
92-
Scenario:
90+
Scenario:
9391
Given I use multiple logs
9492
Multiple
9593
Announce
9694
Me
9795
And this step passes
9896
99-
Scenario Outline:
97+
Scenario Outline:
10098
Given I use message <ann> in line <line>
10199
102-
Examples:
100+
Examples:
103101
| line | ann |
104102
| 1 | anno1 |
105103
| 2 | anno2 |
106104
| 3 | anno3 |
107105
108-
Scenario:
106+
Scenario:
109107
Given I use log and step fails
110108
Announce with fail
111109
(RuntimeError)
112110
./features/step_definitions/log_steps.rb:18:in `/^I use log and step fails$/'
113111
features/f.feature:21:in `I use log and step fails'
114112
And this step passes
115113
116-
Scenario Outline:
114+
Scenario Outline:
117115
Given I use message <ann> in line <line> with result <result>
118116
119-
Examples:
117+
Examples:
120118
| line | ann | result |
121119
| 1 | anno1 | fail | Line: 1: anno1
122120
(RuntimeError)
@@ -132,7 +130,7 @@ Feature: Pretty formatter - Printing messages
132130
Ann
133131
..
134132
Multiple
135-
133+
136134
Announce
137135
Me
138136
..UUU

features/docs/exception_in_after_hook.feature

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Feature: Exception in After Block
2121
end
2222
"""
2323

24-
@spawn
2524
Scenario: Handle Exception in standard scenario step and carry on
2625
Given a file named "features/naughty_step_in_scenario.feature" with:
2726
"""
@@ -54,7 +53,6 @@ Feature: Exception in After Block
5453
5554
"""
5655

57-
@spawn
5856
Scenario: Handle Exception in scenario outline table row and carry on
5957
Given a file named "features/naughty_step_in_scenario_outline.feature" with:
6058
"""
@@ -81,7 +79,7 @@ Feature: Exception in After Block
8179
Scenario Outline: Naughty Step
8280
Given this step <Might Work>
8381
84-
Examples:
82+
Examples:
8583
| Might Work |
8684
| passes |
8785
| does something naughty |

features/docs/exception_in_before_hook.feature

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Feature: Exception in Before Block
1414
end
1515
"""
1616

17-
@spawn
1817
Scenario: Handle Exception in standard scenario step and carry on
1918
Given a file named "features/naughty_step_in_scenario.feature" with:
2019
"""
@@ -56,12 +55,12 @@ Feature: Exception in Before Block
5655
Then it should fail with exactly:
5756
"""
5857
Feature: Sample
59-
58+
6059
Background: # features/naughty_step_in_before.feature:3
6160
I cannot even start this scenario (SomeSetupException)
6261
./features/support/env.rb:4:in `Before'
6362
Given this step passes # features/step_definitions/steps.rb:1
64-
63+
6564
Scenario: Run a good step # features/naughty_step_in_before.feature:6
6665
Given this step passes # features/step_definitions/steps.rb:1
6766

features/docs/formatters/json_formatter.feature

-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ Feature: JSON output formatter
104104
"""
105105

106106
# Need to investigate why this won't pass in-process. error_message doesn't get det?
107-
@spawn
108107
Scenario: one feature, one passing scenario, one failing scenario
109108
When I run `cucumber --format json features/one_passing_one_failing.feature`
110109
Then it should fail with JSON:
@@ -304,7 +303,6 @@ Feature: JSON output formatter
304303
305304
"""
306305

307-
@spawn
308306
Scenario: scenario outline
309307
When I run `cucumber --format json features/outline.feature`
310308
Then it should fail with JSON:
@@ -450,7 +448,6 @@ Feature: JSON output formatter
450448
451449
"""
452450

453-
@spawn
454451
Scenario: scenario outline expanded
455452
When I run `cucumber --expand --format json features/outline.feature`
456453
Then it should fail with JSON:

features/docs/formatters/junit_formatter.feature

-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ Feature: JUnit output formatter
7373
end
7474
"""
7575

76-
@spawn
7776
Scenario: one feature, one passing scenario, one failing scenario
7877
When I run `cucumber --format junit --out tmp/ features/one_passing_one_failing.feature`
7978
Then it should fail with:
@@ -115,7 +114,6 @@ Feature: JUnit output formatter
115114
116115
"""
117116

118-
@spawn
119117
Scenario: one feature in a subdirectory, one passing scenario, one failing scenario
120118
When I run `cucumber --format junit --out tmp/ features/some_subdirectory/one_passing_one_failing.feature --require features`
121119
Then it should fail with:
@@ -260,7 +258,6 @@ can't convert .* into String \(TypeError\)
260258
You *must* specify --out DIR for the junit formatter
261259
"""
262260

263-
@spawn
264261
Scenario: strict mode, one feature, one scenario outline, four examples: one passing, one failing, one pending, one undefined
265262
When I run `cucumber --strict --format junit --out tmp/ features/scenario_outline.feature`
266263
Then it should fail with:
@@ -339,7 +336,6 @@ You *must* specify --out DIR for the junit formatter
339336
340337
"""
341338

342-
@spawn
343339
Scenario: strict mode with --expand option, one feature, one scenario outline, four examples: one passing, one failing, one pending, one undefined
344340
When I run `cucumber --strict --expand --format junit --out tmp/ features/scenario_outline.feature`
345341
Then it should fail with exactly:
@@ -418,7 +414,6 @@ You *must* specify --out DIR for the junit formatter
418414
419415
"""
420416

421-
@spawn
422417
Scenario: run test cases from different features interweaved
423418
When I run `cucumber --format junit --out tmp/ features/one_passing_one_failing.feature:3 features/pending.feature:3 features/one_passing_one_failing.feature:6`
424419
Then it should fail with:

features/docs/getting_started.feature

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Feature: Getting started
33
To get started, just open a command prompt in an empty directory and run
44
`cucumber`. You'll be prompted for what to do next.
55

6-
@spawn
76
Scenario: Run Cucumber in an empty directory
87
Given a directory without standard Cucumber project directory structure
98
When I run `cucumber`

0 commit comments

Comments
 (0)