Module: Sus::Mocks
- Defined in:
- lib/sus/mock.rb
Instance Method Summary collapse
Instance Method Details
#after ⇒ Object
68 69 70 71 72 |
# File 'lib/sus/mock.rb', line 68 def after super @mocks&.each_value(&:clear) end |
#mock(target) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/sus/mock.rb', line 74 def mock(target) validate_mock!(target) mock = self.mocks[target] if block_given? yield mock end return mock end |