Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Remove incorrect help text suggesting that the example option can be a r... #769

Merged
merged 1 commit into from

2 participants

@shepmaster

...egexp

Of special interest is that the Cucumber features have been passing, even though this option hasn't supported a Regexp for a long time. Perhaps all the specs are being filtered out and then all the tests are run? Could indicate the Cucumber tests are fragile...

@myronmarston
Owner

Thanks. We should look into the issue you mentioned...my guess is that the implementation of the "the examples should all pass" step looks only for "0 failures", which could be "0 examples, 0 failures"--so it might be good to have it verify that some examples were actually run.

@myronmarston myronmarston merged commit 79e10c3 into rspec:master
@myronmarston

Thanks, @shepmaster!

@myronmarston myronmarston referenced this pull request from a commit
@myronmarston myronmarston Prevent `the examples should all pass` cuke step false positives.
It did not actually verify that any examples were run, and lead
to a false positive cucumber scenario discovered by @shepmaster
in #769. The underlying assumption of "the examples should all pass"
is that there were actually examples.

I think "the process should succeed even though no examples were run"
is a better description of the case when there are no examples.
27a89f6
@myronmarston

@shepmaster -- you were right about the cucumber assertion being a bit messed up. I corrected it in 27a89f6 ; let me know what you think of the solution I came up with.

@shepmaster shepmaster deleted the shepmaster:remove-regexp-example branch
@shepmaster

@myronmarston Your changes look great; the new step name is very clear about what it will test for. :smiley:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 8 deletions.
  1. +4 −8 features/command_line/example_name_option.feature
View
12 features/command_line/example_name_option.feature
@@ -2,13 +2,13 @@ Feature: --example option
Use the --example (or -e) option to filter examples by name.
- The argument is compiled to a Ruby Regexp, and matched against the full
- description of the example, which is the concatenation of descriptions of the
- group (including any nested groups) and the example.
+ The argument is matched against the full description of the example,
+ which is the concatenation of descriptions of the group (including
+ any nested groups) and the example.
This allows you to run a single uniquely named example, all examples with
similar names, all the examples in a uniquely named group, etc, etc.
-
+
You can also use the option more than once to specify multiple example matches.
Background:
@@ -67,10 +67,6 @@ Feature: --example option
When I run `rspec . --example 'first group first example in first group'`
Then the examples should all pass
- Scenario: one match in one file using regexp
- When I run `rspec . --example 'first .* first example'`
- Then the examples should all pass
-
Scenario: all examples in one group
When I run `rspec . --example 'first group'`
Then the examples should all pass
Something went wrong with that request. Please try again.