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

Commit

Permalink
Refactor feature to avoid a broken step on Ruby 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Jul 16, 2024
1 parent 2e643dc commit 6fed892
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions features/command_line/init.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Feature: `--init` option

Scenario: Generate `.rspec`
When I run `rspec --init`
Then the following files should exist:
| .rspec |
Then the file `.rspec` should exist
And the output should contain "create .rspec"

Scenario: `.rspec` file already exists
Expand Down
6 changes: 6 additions & 0 deletions features/step_definitions/additional_cli_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@
end
end

Then /^the file `([^`]+)` should exist$/ do |file|
cd('.') do
File.exist?(file)
end
end

module Normalization
def normalize_failure_output(text)
whitespace_normalized = text.lines.map { |line| line.sub(/\s+$/, '').sub(/:in .*$/, '') }.join
Expand Down

0 comments on commit 6fed892

Please sign in to comment.