File: escapables_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 (22 lines) | stat: -rw-r--r-- 681 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
require 'spec_helper'

describe ReverseMarkdown do

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

  context "multiple asterisks" do
    it { is_expected.to include ' \*\*two asterisks\*\* ' }
    it { is_expected.to include ' \*\*\*three asterisks\*\*\* ' }
  end

  context "multiple underscores" do
    it { is_expected.to include ' \_\_two underscores\_\_ ' }
    it { is_expected.to include ' \_\_\_three underscores\_\_\_ ' }
  end

  context "underscores within words in code blocks" do
    it { is_expected.to include '    var theoretical_max_infin = 1.0;' }
  end
end