File: paragraphs_spec.rb

package info (click to toggle)
ruby-reverse-markdown 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 440 kB
  • sloc: ruby: 1,452; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 579 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'spec_helper'

describe ReverseMarkdown do
  let(:input)    { File.read('spec/assets/paragraphs.html') }
  let(:document) { Nokogiri::HTML(input) }
  subject { ReverseMarkdown.convert(input) }

  it { is_expected.not_to start_with "\n\n" }
  it { is_expected.to start_with "First content\n\nSecond content\n\n" }
  it { is_expected.to include "\n\n_Complex_\n\n    Content" }
  it { is_expected.to include "**Trailing whitespace:**" }
  it { is_expected.to include "**Trailing non-breaking space: **" }
  it { is_expected.to include "**_Combination: _**" }
end