Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 18d6e3b

Browse files
committed
Refactor feature to avoid a broken step on Ruby 3.4
1 parent 7259d91 commit 18d6e3b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

features/command_line/init.feature

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Feature: `--init` option
1010

1111
Scenario: Generate `.rspec`
1212
When I run `rspec --init`
13-
Then the following files should exist:
14-
| .rspec |
13+
Then the file `.rspec` should exist
1514
And the output should contain "create .rspec"
1615

1716
Scenario: `.rspec` file already exists

features/step_definitions/additional_cli_steps.rb

+6
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@
257257
end
258258
end
259259

260+
Then /^the file `([^`]+)` should exist$/ do |file|
261+
cd('.') do
262+
File.exist?(file)
263+
end
264+
end
265+
260266
module Normalization
261267
def normalize_failure_output(text)
262268
whitespace_normalized = text.lines.map { |line| line.sub(/\s+$/, '').sub(/:in .*$/, '') }.join

0 commit comments

Comments
 (0)