1
votes

I'm looking over various Ruby gems that are tested using Cucumber, and I see this kind of line in the feature files:

Given a file named "myfile.txt":

and I can see it successfully run, but I can't find the step definition, which makes me think it's a "core" step that's defined by Cucumber rather than my code, only I can't find the docs of code for those "core" steps.

2
Step definitions are defined by people. Cucumber does not provide any core step definition on its own. - LINGS
The gem in question is heroku_san which definitely does not define a step for this statement. - Narfanator

2 Answers

2
votes

Cucumber does not provide any step definition on its own. All step definitions has to written by us.

If you are using Eclipse, you can install this plugin https://github.com/matthewpietal/Eclipse-Plugin-for-Cucumber

Jump to defintion: Click on the keyword (here it is "Given"), hit F3 to jump to the Java code defined for that rule

2
votes

It's defined in the "Aruba" gem.

https://github.com/cucumber/aruba/blob/master/lib/aruba/cucumber.rb

Given /^a file named "([^"]*)" with:$/ do |file_name, file_content|
  write_file(file_name, file_content)
end