Class: MarkdownExec::TestHashDelegator::TestHashDelegatorStartFencedBlock

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

Instance Method Summary collapse

Instance Method Details

#setupObject



3142
3143
3144
3145
3146
3147
# File 'lib/hash_delegator.rb', line 3142

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

#test_start_fenced_blockObject



3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
# File 'lib/hash_delegator.rb', line 3149

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