Class: MarkdownExec::TestHashDelegatorStartFencedBlock

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

Instance Method Summary collapse

Instance Method Details

#setupObject



7089
7090
7091
7092
7093
7094
7095
7096
# File 'lib/hash_delegator.rb', line 7089

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

#test_start_fenced_blockObject



7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
# File 'lib/hash_delegator.rb', line 7098

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