-
-
Notifications
You must be signed in to change notification settings - Fork 753
Don't include default pattern when user specifies their own in Rake task. #2305
Conversation
@@ -66,6 +66,11 @@ def spec_command | |||
task.rspec_opts = "-Ifoo" | |||
expect(spec_command).to match(/#{task.rspec_path}.*-Ifoo/) | |||
end | |||
|
|||
it 'wont add --pattern if rspec_opts includes --pattern' do |
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.
s/wont/does not/
(At least, we tend to use present-tense "does not" everywhere else in doc strings like these instead of future-tense "will not").
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, this doc string is confusing. It looks like it does show that it adds --pattern
if rspec_opts
includes --pattern
. How about:
it 'does not add the default --pattern if `rspec_opts` includes --pattern'
Weird, this PR didn't build on travis. Not sure why :(. Anyhow, I definitely think that the change here is appropriate (if the user has configured Do you have any plans to look more into that, @JonRowe? |
It actually did work for me on 3.5.0, and is working when |
feda686
to
368a63c
Compare
Strange, when I played around with the repo from #2303 I shellescaped the pattern (since I was getting a different error w/o it), and saw the exact issue reported by @xmik in #2303. Did you try applying the patch I posted in that issue that allowed me to repro the issue? |
Changes here LGTM, merge when green. |
It's the one in |
I know, my patch escaped the alternate pattern everywhere it appeared, including in |
Don't include default pattern when user specifies their own in Rake task.
When configuring rspec via Rake task and a developer specifies a pattern via rspec_opts, don't include the default pattern. Should fix #2303.