diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-03-28 00:22:48 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-03-28 00:22:48 +0100 |
commit | 296f68816cf575b3ff920f92aec8a4109a7d81d4 (patch) | |
tree | d1e8321dcfd77aa788751583eb54826da55de4f2 /spec/mspec/lib/mspec/runner/example.rb | |
parent | d214c188e48db5049fba8049a57dd6f73b1a57b0 (diff) |
Update to ruby/mspec@16b5a0a
Diffstat (limited to 'spec/mspec/lib/mspec/runner/example.rb')
-rw-r--r-- | spec/mspec/lib/mspec/runner/example.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/mspec/lib/mspec/runner/example.rb b/spec/mspec/lib/mspec/runner/example.rb index 82feba0b03..0d9f0d618c 100644 --- a/spec/mspec/lib/mspec/runner/example.rb +++ b/spec/mspec/lib/mspec/runner/example.rb @@ -3,12 +3,12 @@ require 'mspec/runner/mspec' # Holds some of the state of the example (i.e. +it+ block) that is # being evaluated. See also +ContextState+. class ExampleState - attr_reader :context, :it, :example + attr_reader :context, :it, :example def initialize(context, it, example = nil) - @context = context - @it = it - @example = example + @context = context + @it = it + @example = example end def context=(context) @@ -25,8 +25,8 @@ class ExampleState end def filtered? - incl = MSpec.retrieve(:include) || [] - excl = MSpec.retrieve(:exclude) || [] + incl = MSpec.include + excl = MSpec.exclude included = incl.empty? || incl.any? { |f| f === description } included &&= excl.empty? || !excl.any? { |f| f === description } !included |