Class: MarkdownExec::TestHashDelegator::TestHashDelegatorStartFencedBlock

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

Instance Method Summary collapse

Instance Method Details

#setupObject



3256
3257
3258
3259
3260
3261
# File 'lib/hash_delegator.rb', line 3256

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

#test_start_fenced_blockObject



3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
# File 'lib/hash_delegator.rb', line 3263

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