Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Support guard-rspec (4.0.4) #26

Closed
maxcal opened this issue Mar 4, 2014 · 9 comments
Closed

Support guard-rspec (4.0.4) #26

maxcal opened this issue Mar 4, 2014 · 9 comments

Comments

@maxcal
Copy link

maxcal commented Mar 4, 2014

In later versions of guard-rspec the zeus, bundle and parallel options are depreciated:

Guard::RSpec DEPRECATION WARNING: The :zeus option is deprecated. Please customize the new :cmd option to fit your need.

However if I invoke rspec_parallel in my Guardfile

guard :rspec, cmd: 'zeus parallel_rspec' do
  #...
end

It fails as Guard appends the -f argument.

/Users/maxcal/.rvm/gems/ruby-2.0.0-p247@remote-wind/gems/parallel_tests-0.16.10/lib/parallel_tests/cli.rb:146:in `parse_options!': invalid option: -f (OptionParser::InvalidOption)
    from /Users/maxcal/.rvm/gems/ruby-2.0.0-p247@remote-wind/gems/parallel_tests-0.16.10/lib/parallel_tests/cli.rb:8:in `run'
    from /Users/maxcal/.rvm/gems/ruby-2.0.0-p247@remote-wind/gems/parallel_tests-0.16.10/bin/parallel_rspec:5:in `<top (required)>'
    from /Users/maxcal/.rvm/gems/ruby-2.0.0-p247@remote-wind/bin/parallel_rspec:23:in `load'
    from /Users/maxcal/.rvm/gems/ruby-2.0.0-p247@remote-wind/bin/parallel_rspec:23:in `<main>'
    from /Users/maxcal/.rvm/gems/ruby-2.0.0-p247@remote-wind/bin/ruby_executable_hooks:15:in `eval'
    from /Users/maxcal/.rvm/gems/ruby-2.0.0-p247@remote-wind/bin/ruby_executable_hooks:15:in `<main>'
@gambala
Copy link

gambala commented May 22, 2014

Same problem. And I don't know, where is this -f argument. Has anyone any thoughts?

@nathany
Copy link

nathany commented May 22, 2014

Having this issue too. See guard/guard-rspec#167 as well.

@nathany
Copy link

nathany commented May 22, 2014

When my .rspec file contained

--format RSpec::Instafail it ended up in parallel_tests as "-f", "RSpec::Instafail". Removing that line still results in the error, but "-f", "progress" is passed in instead. parallel_tests expects these to be passed through a "-o" option.

@forrest
Copy link

forrest commented May 22, 2014

👍

@codeurge
Copy link

Having this issue as well - zeus parallel_rspec spec/ passes all tests when run by itself, but when added to guard via cmd: option, I get this error with guard on all tests. However, I have completely removed .rspec & .rspec_parallel.

@nathany
Copy link

nathany commented Jun 3, 2014

Just using regular rspec under guard until this is resolved. I looked through the code but was pretty lost.

@benjie
Copy link

benjie commented Jul 24, 2014

My above pull request to guard-rspec was just accepted; so here's a workaround until there's a better fix - use the following options:

  cmd: 'zeus parallel_rspec -o "',
  cmd_additional_args: '"',

This'll wrap all the normal options and then append the specs to run, e.g.

zeus parallel_rspec -o " --format documentation -r [...]/formatter.rb --format Guard::RSpec::Formatter --failure-exit-code 2 " spec/blah_spec.rb

@schneidmaster
Copy link
Collaborator

I am (as of a few days ago) the new maintainer for this gem, and I'm looking through the old issues now. Do you still need to use the workaround you mentioned? If so, I'll add it to my queue to develop a more long-term fix. If not, feel free to close this issue.

@nathany
Copy link

nathany commented Jul 16, 2015

I'm no longer using this gem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants