Forum: RSpec Is it possible to have autotest running *only* the features not the specs

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8a0acf96f90889fd9baf5318ec029bb1?d=identicon&s=25 Jean-Michel Garnier (Guest)
on 2009-04-29 16:30
(Received via mailing list)
Hi,

I am joining a project which is using Rails 2.0.2, Rspec as a plugin
1.1.4
The problem is specs take 10 minutes to run and I have no time to
optimize
them now.

I am adding cucumber features and would like to run them with autotest
(ZenTest 4.0.0).
Is there a way to  have autotest running *only* the features not the
specs?
It would save a LOT of time ...

In the past, I think I managed to do it with a /script/autofeatures_only
looking like:
#!/usr/bin/env ruby

ENV['AUTOFEATURE'] = 'true' # run only cucumber features
ENV['RSPEC'] = 'false'     # ONLY the features, not the spec! NOT allows
autotest to discover rspec
system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'),
*ARGV) ||
  $stderr.puts("Unable to find autotest.  Please install ZenTest or fix
your
PATH")

My rspec/lib/autotest/discover.rb looks like:
Autotest.add_discovery do
  "rspec" if File.directory?('spec') && ENV['RSPEC'] == true
end

Does anyone have a similar set up with different versions of RSpec? I am
planning to upgrade Rails and RSpec in the coming months.

Thanks,

JM
--
View this message in context:
http://www.nabble.com/Is-it-possible-to-have-autot...
Sent from the rspec-users mailing list archive at Nabble.com.
This topic is locked and can not be replied to.