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
Apply additional arguments to :cmd after defaults. #279
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A clean way of adding additional arguments at the end of the custom command (before the spec files are specified), useful for example if it was necessary to override one of the defaults.
@@ -50,6 +50,14 @@ | |||
expect(command).to match %r{-f doc} | |||
end | |||
end | |||
|
|||
context "with cmd_additional_args" do | |||
let(:options) { { cmd: 'rspec', cmd_additional_args: '-f progress' } } |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
@benjie Good. Please, add an usage example to README. |
@907th Added to the "List of available options" - is that what you meant? |
1 similar comment
907th
pushed a commit
that referenced
this pull request
Jul 24, 2014
Apply additional arguments to :cmd after defaults.
@benjie Yes, thanks! |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch gives a clean way of adding additional arguments at the end of the custom command (before the spec files are specified), useful for example if it was necessary to override one of the defaults.
The reason for this patch is to provide a simple hack to enable compatibility with zeus-parallel_tests (see sevos/zeus-parallel_tests#26) via these (or similar) options:
(parallel_rspec requires all rspec's options to be passed via its
-o
option.) Obviously this isn't very clean because of the assumption that none of the default options have quotes in, but it seems like an acceptable temporary hack that's useful in it's own regard?