Class: Fix::It Private

Inherits:
Spectus::ExpectationTarget
  • Object
show all
Includes:
Spectus::Matchers
Defined in:
lib/fix/it.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Wraps the target of an expectation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subject, challenges, helpers) ⇒ It

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create a new expection target



17
18
19
20
21
# File 'lib/fix/it.rb', line 17

def initialize(subject, challenges, helpers)
  @subject    = subject
  @challenges = challenges
  @helpers    = helpers
end

Instance Attribute Details

#helpersHash (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns The list of helpers.



26
27
28
# File 'lib/fix/it.rb', line 26

def helpers
  @helpers
end

Instance Method Details

#verify(&spec) ⇒ ::Spectus::Result::Pass, ::Spectus::Result::Fail

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Verify the expectation.



33
34
35
36
37
# File 'lib/fix/it.rb', line 33

def verify(&spec)
  instance_eval(&spec)
rescue ::Spectus::Result::Fail => f
  f
end