ichy
2017-12-30 08:35:20 UTC
Hi,
I recently upgraded cucumber for ruby from 2.4 to 3.1.
i have a feature like below.
```
Feature: scenario_without_any_steps
Scenario: without steps
this scenario has no steps.
i need to have some specifications documented to communicate with my
customer.
Scenario: with steps
this scenario has a step.
When i have steps
Then cucumber emits events
When i don't have steps
Then cucumber doesn't emit events
```
when i run this feature, i got the output like this.
```
Feature: scenario_without_any_steps
Scenario: with steps
this scenario has a step.
When i have steps
Then cucumber emits events
When i don't have steps
Then cucumber doesn't emit events
2 scenarios (1 undefined, 1 passed)
4 steps (4 undefined)
```
it looks like scenario has to have steps to be shown.
i agree with the outcome if cucumber is for test.
but i need output of scenario without steps for html formatter for
documentation.
if i monkey patch a source of
cucumber-ruby-core/lib/cucumber/core/compiler.rb#on_test_case
```
Test::Case.new(test_steps, source).describe_to(receiver) if
test_steps.count > 0
```
to
```
Test::Case.new(test_steps, source).describe_to(receiver)
```
then i will see the other scenario, too.
is this more appropriate to be a tool for communication?
or i might not know an option to make it happen.
i want to hear some opinions if my understanding makes sense or not.
my best regards
I recently upgraded cucumber for ruby from 2.4 to 3.1.
i have a feature like below.
```
Feature: scenario_without_any_steps
Scenario: without steps
this scenario has no steps.
i need to have some specifications documented to communicate with my
customer.
Scenario: with steps
this scenario has a step.
When i have steps
Then cucumber emits events
When i don't have steps
Then cucumber doesn't emit events
```
when i run this feature, i got the output like this.
```
Feature: scenario_without_any_steps
Scenario: with steps
this scenario has a step.
When i have steps
Then cucumber emits events
When i don't have steps
Then cucumber doesn't emit events
2 scenarios (1 undefined, 1 passed)
4 steps (4 undefined)
```
it looks like scenario has to have steps to be shown.
i agree with the outcome if cucumber is for test.
but i need output of scenario without steps for html formatter for
documentation.
if i monkey patch a source of
cucumber-ruby-core/lib/cucumber/core/compiler.rb#on_test_case
```
Test::Case.new(test_steps, source).describe_to(receiver) if
test_steps.count > 0
```
to
```
Test::Case.new(test_steps, source).describe_to(receiver)
```
then i will see the other scenario, too.
is this more appropriate to be a tool for communication?
or i might not know an option to make it happen.
i want to hear some opinions if my understanding makes sense or not.
my best regards
--
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.
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.