Sha256: ddda5a527f14d9444274dab8e8a3f63b3239783b9c0d284cf3cc8abe3ce19827
Contents?: true
Size: 686 Bytes
Versions: 3
Compression:
Stored size: 686 Bytes
Contents
# frozen_string_literal: true RSpec.describe TTY::Markdown, 'horizontal rule' do let(:symbols) { TTY::Markdown.symbols } it "draws a horizontal rule" do markdown =<<-TEXT --- TEXT parsed = TTY::Markdown.parse(markdown, width: 10) expect(parsed).to eq("\e[33m#{symbols[:diamond]}#{symbols[:line]*8}#{symbols[:diamond]}\e[0m\n") end it "draws a horizontal rule within header indentation" do markdown =<<-TEXT ### header --- TEXT parsed = TTY::Markdown.parse(markdown, width: 20) expect(parsed).to eq([ " \e[36;1mheader\e[0m\n", " \e[33m#{symbols[:diamond]}#{symbols[:line]*10}#{symbols[:diamond]}\e[0m\n" ].join) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tty-markdown-0.6.0 | spec/unit/parse/hr_spec.rb |
tty-markdown-0.5.1 | spec/unit/parse/hr_spec.rb |
tty-markdown-0.5.0 | spec/unit/parse/hr_spec.rb |