Sure. Put all your fast specs in a subdirectory spec/fast. Then

  Spec::Rake::SpecTask.new do |t|
    t.spec_files = FileList['spec/fast/**/*_spec.rb']
  end

or something to that effect.

Alternately, put your slow specs in a subdirectory, but I think the
above way is arguably cleaner.

---
Alex Chaffee - [email protected] - http://alexch.github.com
Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch |
http://alexch.tumblr.com



On Wed, Aug 26, 2009 at 12:09 PM, morgflast<[email protected]> wrote:
>
> My rails project has a lot of specs.   Most of these run quickly.  There are
> a handful of files, like spec/model/slow_spec1.rb and
> spec/model/slow_spec2.rb that run slowly because they have to do various
> slow operations like using a timer.
>
> I would like to write a rake task, like rake:spec:fast, that runs only the
> fast specs.  Any ideas of how to do this?
>
>
> --
> View this message in context: 
> http://www.nabble.com/running-a-fast-subset-of-the-specs-tp25154030p25154030.html
> Sent from the rspec-users mailing list archive at Nabble.com.
>
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to