New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --exclude_pattern option to configuration #1651
Conversation
When I run `rspec` | ||
Then the output should contain "3 examples, 0 failures" | ||
|
||
Scenario: The `--exclude-pattern` flag makes RSpec first match the default pattern, then skip files matching the specified exclude pattern |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording on this ("...makes RSpec first match the default pattern...") makes it sound like --exclude-pattern
can't be combined with --pattern
. If that's true, we should find a way to make them work together. If it's not true, we should find a better wording for this :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you're right. They do work together. I'll work on that wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, maybe we can add a scenario showing them working together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
BTW, if there reaches a point where you don't have time or desire to continue working on this, let us know and we'll be happy to pick it up. We like to let contributors finish there PRs when they are able, though :). |
Good to know. I'm planning on finishing it! Let me know if I need to hurry up. |
Actually feel free to make the changes required to support those other two merges. Let me know if there's anything I should do with my feature after that. |
OK. I've got a couple other PRs on my list to tackle first, but I'll add yours to my list. In the meantime, if you want to take this further, feel free :). |
I'm going to pick this up in the next couple days and get it ready to merge. |
See #1651 (comment) for background discussion.
Closing in favor of #1671. |
See rspec#1651 (comment) for background discussion.
Resolves #1626. It allows passing
--exclude_pattern
torspec
on the command line.Afaik we still can't use the power of rake tasks. This is because the rake task still uses
FileList
to include files. And once files are included, they can't be changed by passing--pattern
or--exclude-pattern
(there is a warning about this when you try). Fortunately, once #1589 is merged, it will be possible to pass--exclude-pattern
withinrspec_opts
in the rake task config. This is because the rake task'spattern
option will use--pattern
which can be combined with--exclude-pattern
for a one-two punch.@myronmarston Let me know how this looks! Sorry it took so long.