Discussion:
[Cucumber] New ParameterTypes for Doc Strings
Add Reply
a***@gmail.com
2017-11-15 10:38:53 UTC
Reply
Permalink
Raw Message
Hi guys,

Is there any way to use new ParameterTypes with doc strings to make some
transformations to string. Small example:
* Then I have output:*
* """*
* gem version is <gem_version>*
* """*
And I want use ParameterType to replace <gem_version> with actual version
of the gem. I've tried this:

*ParameterType(*
* name: 'test',*
* regexp: /<gem_version>/,*
* transformer: ->(version) { version.gsub('<gem_version>',
MyGem::VERSION) }*
* end*
*)*

It didn't work. Before update it worked with Transformation like this:


*Transform /<gem_version>/ do |text|*
* text.gsub('<gem_version>', MyGem::VERSION)*
* end *


Best regards,
Alexey
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...