Skip to content

Commit f08865c

Browse files
authored
Support 'And' and 'But' annotations in Ruby glue files (#211)
1 parent 1910baf commit f08865c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
9+
### Fixed
10+
- (Ruby) Support `And` and `But` step definition annotations ([#211](https://github.com/cucumber/language-service/pull/211))
911

1012
## [1.6.0] - 2024-05-12
1113
### Added

src/language/rubyLanguage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const rubyLanguage: Language = {
7676
(regex) @expression
7777
]
7878
)
79-
(#match? @method "(Given|When|Then)$")
79+
(#match? @method "(Given|When|Then|And|But)$")
8080
) @root
8181
`,
8282
],

test/language/testdata/ruby/StepDefinitions.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Given('a {uuid}') do |uuid|
22
end
33

4-
Given('a {date}') do |date|
4+
When('a {date}') do |date|
55
end
66

7-
Given('a {planet}') do |planet|
7+
Then('a {planet}') do |planet|
88
end
99

10-
Given(/^a regexp$/) do
10+
And(/^a regexp$/) do
1111
end
1212

13-
Given('an {undefined-parameter}') do |date|
13+
But('an {undefined-parameter}') do |date|
1414
end
1515

1616
Given('the bee\'s knees') do |date|

0 commit comments

Comments
 (0)