Class: MarkdownExec::TestHashDelegatorStartFencedBlock

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

Instance Method Summary collapse

Instance Method Details

#setupObject



6954
6955
6956
6957
6958
6959
6960
6961
# File 'lib/hash_delegator.rb', line 6954

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

#test_start_fenced_blockObject



6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
# File 'lib/hash_delegator.rb', line 6963

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