spork/guard/rspec now disregarding filter tags for examples

33 views
Skip to first unread message

Stan Kaufman

unread,
Jan 11, 2012, 1:21:54 PM1/11/12
to Ruby on Rails: Talk
Something in the latest iteration of spork, guard, or rspec now causes
all examples to be run, not just tagged examples (say, with :focus =>
true). This was posted as an issue for rspec:

https://github.com/dchelimsky/rspec/issues/47

But when running the same command that guard generates in verbose
mode:

DEBUG (09:48:16): Command execution: bundle exec rspec --drb -f
progress -r /Users/skaufman/.rvm/gems/ruby-1.9.3-p0@ee_core/gems/guard-
rspec-0.6.0/lib/guard/rspec/formatters/notification_rspec.rb -f
Guard::RSpec::Formatter::NotificationRSpec --out /dev/null --failure-
exit-code 2 spec

directly on the command line:

$ bundle exec rspec --drb -f progress -r /Users/skaufman/.rvm/gems/
ruby-1.9.3-p0@ee_core/gems/guard-rspec-0.6.0/lib/guard/rspec/
formatters/notification_rspec.rb -f
Guard::RSpec::Formatter::NotificationRSpec --out /dev/null --failure-
exit-code 2 spec

rspec does limit the run to tagged examples. So this doesn't appear to
be an rspec issue per se.

I've tried to poke in the guts of spork and guard looking for clues,
but I'm clueless. Any ideas about which gem is at fault so that an
issue can be filed in the right place at github and asked in the right
Google group?

Here's the configuration where this behavior occurs (with Rails
3.1.3):

guard (0.10.0)
guard-rspec (0.6.0)
spork (0.9.0.rc9)
guard-spork (0.5.1)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
rspec-mocks (2.8.0)
rspec (2.8.0)
rspec-rails (2.8.1)

TIA.

Stan Kaufman

unread,
Jan 11, 2012, 3:46:47 PM1/11/12
to Ruby on Rails: Talk
On Jan 11, 10:21 am, Stan Kaufman <stan.kauf...@gmail.com> wrote:
> Something in the latest iteration of spork, guard, or rspec now causes
> all examples to be run, not just tagged examples (say, with :focus =>
> true).

Hmm...looks like this is a spork vs rspec problem; the behavior occurs
without involving guard:

- rspec run alone limits test execution to examples tagged with :focus
- rspec run within spork ignores the :focus tag and runs all examples

It appears that the last update to spork was last November, whereas
rspec was updated a few days ago. So whatever is going on isn't due to
a new change in spork but rather a new spork incompatibility with
rspec that presumably will need a fix in spork.

Stan Kaufman

unread,
Jan 13, 2012, 10:15:55 AM1/13/12
to Ruby on Rails: Talk
On Jan 11, 12:46 pm, Stan Kaufman <stan.kauf...@gmail.com> wrote:
>
> Hmm...looks like this is a spork vs rspec problem; the behavior occurs
> without involving guard:

Turns out that this is an rspec 2.8.x issue. See the discussion here:

https://github.com/sporkrb/spork/issues/166

The simple workaround is to add

--tag focus

to your .rspec file, and filtering on :focus tags once again works
properly
Reply all
Reply to author
Forward
0 new messages