Class: MarkdownExec::TestHashDelegator::TestHashDelegatorStartFencedBlock

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

Instance Method Summary collapse

Instance Method Details

#setupObject



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

def setup
  @hd = HashDelegator.new({
                            block_name_wrapper_match: 'WRAPPER_REGEX',
                            block_calls_scan: 'CALLS_REGEX'
                          })
end

#test_start_fenced_blockObject



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

def test_start_fenced_block
  line = '```fenced'
  headings = ['Heading 1']
  regex = /```(?<name>\w+)(?<rest>.*)/

  fcb = @hd.start_fenced_block(line, headings, regex)

  assert_instance_of MarkdownExec::FCB, fcb
  assert_equal headings, fcb.headings
  assert_equal 'fenced', fcb.dname
end