Class: Fix::ExpectationLow

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

Instance Attribute Summary

Attributes inherited from Expectation

#priority

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
# 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, @definition
    data   = presenter report, got, subject

    Hash[ data.to_a + meta(subject).to_a ].merge object: front_object
  }.value
end