Class: Mocha::ChangeStateSideEffect

Inherits:
Object
  • Object
show all
Defined in:
lib/mocha/change_state_side_effect.rb

Instance Method Summary collapse

Constructor Details

#initialize(state) ⇒ ChangeStateSideEffect

Returns a new instance of ChangeStateSideEffect.



5
6
7
# File 'lib/mocha/change_state_side_effect.rb', line 5

def initialize(state)
  @state = state
end

Instance Method Details

#mocha_inspectObject



13
14
15
# File 'lib/mocha/change_state_side_effect.rb', line 13

def mocha_inspect
  "then #{@state.mocha_inspect}"
end

#performObject



9
10
11
# File 'lib/mocha/change_state_side_effect.rb', line 9

def perform
  @state.activate
end