Sha256: cff64a5d3adafc01843d78e03e76ffc9f008ffbb4f9c2b26df2e0e7d51793e7b
Contents?: true
Size: 1.2 KB
Versions: 6
Compression:
Stored size: 1.2 KB
Contents
require 'spec_helper' describe ReverseMarkdown::Converters::Del do let(:converter) { ReverseMarkdown::Converters::Del.new } context 'with github_flavored = true' do before { ReverseMarkdown.config.github_flavored = true } it 'converts the input as expected' do input = node_for('<del>deldeldel</del>') expect(converter.convert(input)).to eq '~~deldeldel~~' end it 'converts the input as expected' do input = node_for('<s>strike that</s>') expect(converter.convert(input)).to eq '~~strike that~~' end it 'skips empty tags' do input = node_for('<del></del>') expect(converter.convert(input)).to eq '' end it 'knows about its enabled/disabled state' do expect(converter).to be_enabled expect(converter).not_to be_disabled end end context 'with github_flavored = false' do before { ReverseMarkdown.config.github_flavored = false } it 'does not convert anything' do input = node_for('<del>deldeldel</del>') expect(converter.convert(input)).to eq 'deldeldel' end it 'knows about its enabled/disabled state' do expect(converter).not_to be_enabled expect(converter).to be_disabled end end end
Version data entries
6 entries across 6 versions & 2 rubygems