Sha256: f64c366bd12cb1fba42dd72e13e5b4374c77e30b74540da9ce4789b32b1fa759
Contents?: true
Size: 918 Bytes
Versions: 10
Compression:
Stored size: 918 Bytes
Contents
require 'spec_helper' describe ReverseAsciidoctor do let(:input) { File.read('spec/assets/code.html') } let(:document) { Nokogiri::HTML(input) } subject { ReverseAsciidoctor.convert(input) } it { is_expected.to match /inline `code` block/ } it { is_expected.to match /\n<code>var this\;\nthis\.is/ } it { is_expected.to match /block"\)\nconsole/ } context "with github style code blocks" do subject { ReverseAsciidoctor.convert(input) } it { is_expected.to match /inline `code` block/ } it { is_expected.to match /\n\.\.\.\.\n<code>var this\;\nthis/ } it { is_expected.to match /it is"\) ?\n <\/code>\n\.\.\.\./ } end context "code with indentation" do subject { ReverseAsciidoctor.convert(input) } it { is_expected.to match(/^<code>tell application "Foo"\n/) } it { is_expected.to match(/^ beep\n/) } it { is_expected.to match(/^end tell\n/) } end end
Version data entries
10 entries across 10 versions & 2 rubygems