Method: ExampleState#filtered?

Defined in:
lib/extensions/mspec/mspec/runner/example.rb

#filtered?Boolean

Returns:

  • (Boolean)


27
28
29
30
31
32
33
# File 'lib/extensions/mspec/mspec/runner/example.rb', line 27

def filtered?
  incl = MSpec.retrieve(:include) || []
  excl = MSpec.retrieve(:exclude) || []
  included   = incl.empty? || incl.any? { |f| f === description }
  included &&= excl.empty? || !excl.any? { |f| f === description }
  not included
end