[rspec-users] unless filter

Shamaoke shamaoke at hotmail.com
Thu Mar 10 05:32:38 EST 2011


Hi.

Why doesn't the following filter work?

~~~
# encoding: utf-8
# ./example_spec.rb

RSpec.configure do |config|
  config.filter = {
    unless: :condition_acceptable
  }
end

describe 'some code' do
  it 'does one', if: :condition_acceptable do
  end

  it 'does two', unless: :condition_acceptable do
  end
end
~~~

~~~
$ rspec example_spec.rb
No examples were matched # instead of 'some code does two'
~~~

Thanks.

Debian GNU/Linux 5.0.7;
Ruby 1.9.2;
RSpec 2.5.0.


More information about the rspec-users mailing list