Class: MarkdownExec::TestHashDelegator::TestHashDelegatorHandleBackLink

Inherits:
Minitest::Test
  • Object
show all
Defined in:
lib/hash_delegator.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



3044
3045
3046
3047
# File 'lib/hash_delegator.rb', line 3044

def setup
  @hd = HashDelegator.new
  @hd.stubs(:history_state_pop)
end


3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
# File 'lib/hash_delegator.rb', line 3049

def test_pop_link_history_and_trigger_load
  # Verifying that history_state_pop is called
  # @hd.expects(:history_state_pop).once

  result = @hd.pop_link_history_and_trigger_load

  # Asserting the result is an instance of LoadFileLinkState
  assert_instance_of LoadFileLinkState, result
  assert_equal LoadFile::Load, result.load_file
  assert_nil result.link_state.block_name
end