[rspec-users] Trying to spec all models

Ed Howland ed.howland at gmail.com
Fri Sep 17 10:29:19 EDT 2010

Thanks David and Phillip.

Phillip, I was reading about RSpec 2?'s filter capabilities and it
seemed that you were working on a wrapper to  dynamically adding a
configure block when the wrapper was passed an option.

David, I see the work in 2.1 for this and it is just what I need. I
want to turn off some describe blocks (via some sort of exclusion
filter) normally, but optionally turn them on.

First, I have to determine if (exclusion) filters applies to 1.3.0.
And if they do, then I might try something like this:

RSpec.configure do |c|
  c.exclusion_filter = {
    :if => lambda {|what|
      case what
       when :dont_run
          ENV['EXCLUDE'] == 'true'

then to invoke:

bin/rake spec EXCLUDE=true


Ed Howland

More information about the rspec-users mailing list