-
Notifications
You must be signed in to change notification settings - Fork 6
Snippets #12
Comments
I've got the outline of a custom TCL formatter for this on a branch, which extends the default pretty one, but not sure if this is the correct approach. From looking through Cucumber I can see that it adds support for the "Ruby Language", with the RbLanguage class registering a Ruby snippet generator, so perhaps adding TCL support in a similar way is a better approach, rather than using an entirely different formatter. |
Yeah @ahhbristow formatters are really for results output, and they delegate to the snippet generators to print the snippets. If you write a snippet generator (it's really just one Ruby proc, or an object that responds to |
So yeah, if you do something like https://github.com/cucumber/cucumber-ruby/blob/master/lib/cucumber/rb_support/rb_language.rb#L56 around about here you'll be on the right track. |
The existing snippets look more complex than they really are because there's some sophistication around exactly what style of Ruby snippet is generated. The tests are probably quite instructive though: https://github.com/cucumber/cucumber-ruby/blob/master/spec/cucumber/rb_support/snippet_spec.rb |
Luxury feature this, but we should aim for it.
When a step is undefined, Cucumber should delegate to Cucumber-Tcl to get snippet suggestions for Tcl, then print them to the console.
The text was updated successfully, but these errors were encountered: