Skipping Slow Specs

Hi!

I have a slow spec. Before anyone shouts, it’s an service integration
test,
that needs the server available. As I don’t have this server near every
time, is there an easy way to skip this spec during rake spec /
autospec? I
ended renaming the file, which is IMO, ugly.

Any ideas?

On Apr 16, 2010, at 8:29 AM, Douglas Campos wrote:

Hi!

I have a slow spec. Before anyone shouts, it’s an service integration test, that needs the server available. As I don’t have this server near every time, is there an easy way to skip this spec during rake spec / autospec? I ended renaming the file, which is IMO, ugly.

Any ideas?

rspec-2 offers filtering, but rspec-1 does not. If you’re using rspec-2,
you can do this:

it “does something expensive”, :slow => true do

end

Rspec.configure do |c|
c.exclusion_filter = {:slow => true}
end

HTH,
David