-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
translate most regexps to cucumber expressions
- Loading branch information
1 parent
43e5b2c
commit 92208f6
Showing
9 changed files
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# frozen_string_literal: true | ||
Then(/^I should see the CLI help$/) do | ||
Then('I should see the CLI help') do | ||
expect(all_output).to include('Usage:') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# frozen_string_literal: true | ||
Given(/^the following profiles? (?:are|is) defined:$/) do |profiles| | ||
Given('the following profile(s) are/is defined:') do |profiles| | ||
write_file 'cucumber.yml', profiles | ||
end | ||
|
||
Then(/^the (.*) profile should be used$/) do |profile| | ||
Then('the {word} profile should be used') do |profile| | ||
step 'the stdout should contain:', profile | ||
end | ||
|
||
Then(/^exactly these files should be loaded:\s*(.*)$/) do |files| | ||
expect(all_stdout.scan(/^ \* (.*\.rb)$/).flatten).to eq files.split(/,\s+/) | ||
Then('exactly these files should be loaded: {list}') do |files| | ||
expect(all_stdout.scan(/^ \* (.*\.rb)$/).flatten).to eq files | ||
end | ||
|
||
Then(/^exactly these features should be run:\s*(.*)$/) do |files| | ||
expect(all_stdout.scan(/^ \* (.*\.feature)$/).flatten).to eq files.split(/,\s+/) | ||
Then('exactly these features should be run: {list}') do |files| | ||
expect(all_stdout.scan(/^ \* (.*\.feature)$/).flatten).to eq files | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# frozen_string_literal: true | ||
When(/^I run the following Ruby code:$/) do |code| | ||
When('I run the following Ruby code:') do |code| | ||
run_simple %{ruby -e "#{code}"} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ParameterType( | ||
name: 'list', | ||
regexp: /.*/, | ||
type: Array, | ||
transformer: ->(s) { s.split(/,\s+/)}, | ||
use_for_snippets: false, | ||
prefer_for_regexp_match: false | ||
) |