Module: MarkdownExec

Includes:
Exceptions
Defined in:
lib/markdown_exec.rb,
lib/fcb.rb,
lib/mdoc.rb,
lib/mdoc.rb,
lib/filter.rb,
lib/filter.rb,
lib/link_history.rb,
lib/link_history.rb,
lib/option_value.rb,
lib/saved_assets.rb,
lib/markdown_exec.rb,
lib/hash_delegator.rb,
lib/hash_delegator.rb,
lib/saved_files_matcher.rb,
lib/markdown_exec/version.rb

Overview

:reek:TooManyConstants

Defined Under Namespace

Classes: DebugHelper, Error, FCB, FileInMenu, Filter, FilterTest, HashDelegator, HashDelegatorParent, Histogram, LinkHistory, LinkState, MDoc, MarkParse, MenuBuilder, OptionValue, PathUtilsTest, PromptForFilespecWithWildcardTest, SavedAsset, SavedFilesMatcher, SearchResultsReport, TestApplyOtherFilters, TestCollectUniqueNames, TestHashDelegator, TestHashDelegator0, TestHashDelegatorAppendDivider, TestHashDelegatorBlockFind, TestHashDelegatorBlockType, TestHashDelegatorBlocksFromNestedFiles, TestHashDelegatorCollectRequiredCodeLines, TestHashDelegatorCommandOrUserSelectedBlock, TestHashDelegatorCountBlockInFilename, TestHashDelegatorCreateAndWriteFile, TestHashDelegatorDetermineBlockState, TestHashDelegatorDisplayRequiredCode, TestHashDelegatorFetchColor, TestHashDelegatorFormatExecutionStreams, TestHashDelegatorFormatReferencesSendColor, TestHashDelegatorHandleBackLink, TestHashDelegatorHandleBlockState, TestHashDelegatorHandleStream, TestHashDelegatorIterBlocksFromNestedFiles, TestHashDelegatorMenuChromeColoredOption, TestHashDelegatorMenuChromeOption, TestHashDelegatorStartFencedBlock, TestHashDelegatorStringSendColor, TestHashDelegatorUpdateMenuAttribYieldSelectedWithBody, TestHashDelegatorWaitForUserSelectedBlock, TestHashDelegatorYieldToBlock, TestLinkHistory, TestMDoc, TestMDoc2, TestMDocCollectDependencies

Constant Summary collapse

APP_DESC =
'Markdown Executor'
APP_NAME =
'MDE'
BIN_NAME =
'mde'
GEM_NAME =
'markdown_exec'
TAP_DEBUG =
'MDE_DEBUG'
VERSION =
'2.5.0'

Instance Method Summary collapse

Methods included from Exceptions

error_handler, warn_format

Instance Method Details

#test_select_blockObject



1090
1091
1092
1093
1094
1095
1096
1097
1098
# File 'lib/markdown_exec.rb', line 1090

def test_select_block
  blocks = [block1, block2]
  menu = [m1, m2]

  block, state = obj.select_block(blocks, menu, nil, {})

  assert_equal block1, block
  assert_equal MenuState::CONTINUE, state
end

#test_yield_line_if_selected_with_lineObject



5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
# File 'lib/hash_delegator.rb', line 5056

def test_yield_line_if_selected_with_line
  block_called = false
  HashDelegator.yield_line_if_selected('Test line',
                                       [:line]) do |type, content|
    block_called = true
    assert_equal :line, type
    assert_equal 'Test line', content.body[0]
  end
  assert block_called
end

#test_yield_line_if_selected_without_blockObject



5075
5076
5077
5078
# File 'lib/hash_delegator.rb', line 5075

def test_yield_line_if_selected_without_block
  result = HashDelegator.yield_line_if_selected('Test line', [:line])
  assert_nil result
end

#test_yield_line_if_selected_without_lineObject



5067
5068
5069
5070
5071
5072
5073
# File 'lib/hash_delegator.rb', line 5067

def test_yield_line_if_selected_without_line
  block_called = false
  HashDelegator.yield_line_if_selected('Test line', [:other]) do |_|
    block_called = true
  end
  refute block_called
end