Class: MarkdownExec::TestHashDelegator::TestHashDelegatorHandleBackLink

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

Instance Method Summary collapse

Instance Method Details

#setupObject



2930
2931
2932
2933
# File 'lib/hash_delegator.rb', line 2930

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


2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
# File 'lib/hash_delegator.rb', line 2935

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