I'm trying to get a new spec task defined that is 'fast':  that is, it 
skips all :type => :integration tests and any tests that have :slow => true 
set.

We're using spec/integration instead of spec/requests, but I thought I read 
somewhere that they're equivalent, ie that they would both be automagically 
tagged with :type => :integration and :type => :request. (I personally find 
'integration' far more intuitive than 'request' so that's what we've chosen 
to use.)

First question: Is this true?  Does rspec automagically tag my 
spec/requests and spec/integration with the proper type.  If so, is this 
only true when using `rake`, or is it the same with using `rspec`

Next: I've written a task like so:

    desc "Run all but slow (including integration) specs"
  RSpec::Core::RakeTask.new(:fast => 'db:test:prepare') do |t|
    t.rspec_opts = '--tag ~slow --tag ~type:request --tag ~type:integration'
  end

Oddly enough, when the tests run, they say

    Run filtered excluding {:slow=>true, :type=>"integration"}

So second question: Is it not possible to filter out multiple tags of a 
type (ie --tag ~type:request --tag ~type:integration)

Next, it appears that when I use :type => :integration, nothing gets 
filtered, but when I use :type => :request it does. 

So third question:  What make :request so special such that :integration 
does not work the same way.

Any help on these matters is greatly appreciated!

Brad
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to