Class: Fix::It
- Inherits:
-
Object
- Object
- Fix::It
- Defined in:
- lib/fix/it.rb
Overview
Wraps the target of a Fix expectation.
Instance Method Summary collapse
-
#expect(object = nil, &block) ⇒ Expect
Create a new expection target given an object.
-
#is_expected ⇒ Expect
Create a new expection target given the subject.
Instance Method Details
#expect(object = nil, &block) ⇒ Expect
Create a new expection target given an object.
28 29 30 31 32 33 34 |
# File 'lib/fix/it.rb', line 28 def expect(object = nil, &block) if block ::Fix::Expect.new(block) else ::Fix::Expect.new(::Defi.send(:itself).to(object)) end end |
#is_expected ⇒ Expect
Create a new expection target given the subject.
rubocop:disable Naming/PredicateName
41 42 43 |
# File 'lib/fix/it.rb', line 41 def is_expected ::Fix::Expect.new(callable) end |