require 'spec_helper' require 'filters/badges' describe BadgesFilter do describe '#run' do let(:content) { nil } subject(:run) { described_class.new.run(content) } context 'when (FREE) badge' do let(:content) { '(FREE)' } it 'returns correct HTML' do expect(run).to eq('') end end context 'when (FREE SELF) badge' do let(:content) { '(FREE SELF)' } it 'returns correct HTML' do expect(run).to eq('') end end context 'when (FREE EXPERIMENT) badge' do let(:content) { '(FREE EXPERIMENT)' } it 'returns correct HTML' do expect(run).to eq('') end end context 'when (SAAS EXPERIMENT) badge' do let(:content) { '(SAAS EXPERIMENT)' } it 'returns correct HTML' do expect(run).to eq('') end end context 'when (BETA) badge' do let(:content) { '(BETA)' } it 'returns correct HTML' do expect(run).to eq('') end end end describe '#run_from_markdown' do let(:content) { nil } subject(:run_from_markdown) { described_class.new.run_from_markdown(content) } context 'when **(FREE)** badge' do let(:content) { '**(FREE)**' } it 'returns correct HTML' do expect(run_from_markdown).to eq('') end end context 'when **(FREE SELF)** badge' do let(:content) { '**(FREE SELF)**' } it 'returns correct HTML' do expect(run_from_markdown).to eq('') end end context 'when **(FREE EXPERIMENT)** badge' do let(:content) { '**(FREE EXPERIMENT)**' } it 'returns correct HTML' do expect(run_from_markdown).to eq('') end end context 'when **(SAAS EXPERIMENT)** badge' do let(:content) { '**(SAAS EXPERIMENT)**' } it 'returns correct HTML' do expect(run_from_markdown).to eq('') end end context 'when **(BETA)** badge' do let(:content) { '**(BETA)**' } it 'returns correct HTML' do expect(run_from_markdown).to eq('') end end end end