Class: MarkdownExec::TestHashDelegator::TestHashDelegatorHandleBackLink

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

Instance Method Summary collapse

Instance Method Details

#setupObject



2986
2987
2988
2989
# File 'lib/hash_delegator.rb', line 2986

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


2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
# File 'lib/hash_delegator.rb', line 2991

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