Class: Fix::ExpectationLow

Inherits:
ExpectationMedium show all
Defined in:
lib/fix/expectation_low.rb

Instance Method Summary collapse

Methods inherited from Expectation

#initialize

Constructor Details

This class inherits a constructor from Fix::Expectation

Instance Method Details

#evaluate(front_object) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/fix/expectation_low.rb', line 5

def evaluate front_object
  subject = Subject.new front_object, *@args
  got     = nil

  Thread.new {
    report = expect { got = subject.actual }.
      public_send target, @matcher => @expected

    data = presenter report, got, subject

    Hash[ data.to_a + meta(subject).to_a ]
  }.value
end