Class: MarkdownExec::TestHashDelegator::TestHashDelegatorStartFencedBlock

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

Instance Method Summary collapse

Instance Method Details

#setupObject



3198
3199
3200
3201
3202
3203
# File 'lib/hash_delegator.rb', line 3198

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

#test_start_fenced_blockObject



3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
# File 'lib/hash_delegator.rb', line 3205

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