π What did you see?
Undefined step, when the step is defined and the tests run just fine:

module FeatureSteps
step "I am logged in" do
login(@user)
end
# ...
end
β
What did you expect to see?
Step definition is found by the language service:

π¦ Which tool/library version are you using?
ruby 3.4.7
turnip 4.4.1 (latest)
Cucumber extension 1.11.0 (latest)
# Gemfile.lock
cucumber-gherkin (32.1.2)
cucumber-messages (> 25, < 28)
cucumber-messages (27.2.0)
cuke_modeler (3.24.0)
cucumber-gherkin (< 33.0)
rspec (3.13.1)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
turnip (4.4.1)
cuke_modeler (~> 3.15)
rspec (>= 3.0, < 4.0)
π¬ How could we reproduce it?
- setup a base Ruby repo, with bundler
bundle add turnip
- setup rspec + turnip:
$ bundle exec rspec --init
$ echo '--require turnip/rspec' >> .rspec
$ echo '--require steps' >> .rspec
$ cat <<'EOF' > spec/steps.rb
RSpec.configure { |config| config.include(FeatureSteps, type: :feature) }
module FeatureSteps
step "I am logged in" do
puts "TODO: log in"
end
end
EOF
- make a feature file:
$ cat <<'EOF' > spec/features/example.feature
Feature: example
Scenario: logged in
Given I am logged in
EOF
- configure Cucumber VS Code extension:
"cucumber.features": [
"spec/**/*.feature",
"features/**/*.feature",
],
"cucumber.glue": [
"*spec/support/*.rb",
"*features/**/*.rb",
]
- view the feature file in VS Code:
code spec/features/example.feature
π Any additional context?
Fixed (hopefully) in cucumber/language-service#297, similar to #233
Thanks in advance βΊοΈ
Henry
π What did you see?
Undefined step, when the step is defined and the tests run just fine:

β What did you expect to see?
Step definition is found by the language service:

π¦ Which tool/library version are you using?
ruby 3.4.7
turnip 4.4.1 (latest)
Cucumber extension 1.11.0 (latest)
π¬ How could we reproduce it?
bundle add turnipcode spec/features/example.featureπ Any additional context?
Fixed (hopefully) in cucumber/language-service#297, similar to #233
Thanks in advanceβΊοΈ
Henry