File: test_helper.rb

package info (click to toggle)
ruby-jekyll-toc 0.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 244 kB
  • sloc: ruby: 912; makefile: 9
file content (26 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

require 'simplecov'
SimpleCov.start

require 'minitest/autorun'
require 'minitest/reporters'
Minitest::Reporters.use!

require 'jekyll'
require 'jekyll-toc'

SIMPLE_HTML = <<~HTML
  <h1>Simple H1</h1>
  <h2>Simple H2</h2>
  <h3>Simple H3</h3>
  <h4>Simple H4</h4>
  <h5>Simple H5</h5>
  <h6>Simple H6</h6>
HTML

module TestHelpers
  def read_html_and_create_parser(options = {})
    @parser = Jekyll::TableOfContents::Parser.new(SIMPLE_HTML, options)
  end
end