Sha256: c5a6612665f78a96ae34174033e7c4054c3c177f5085c9ea88d70e3a8f75ea09
Contents?: true
Size: 703 Bytes
Versions: 3
Compression:
Stored size: 703 Bytes
Contents
require 'spec_helper' describe Caramelize::FilterProcessor do let(:filters) { [] } let(:input_wiki) { double(filters: filters) } let(:body) { 'body' } subject(:processor) { described_class.new(input_wiki) } class ReverseFilter def initialize(body) @body = body end def run @body.reverse end end describe '#run' do context 'without any filters' do it 'returns same revision body' do expect(processor.run(body)).to eql body end end context 'with reverse filter' do let(:filters) { [ReverseFilter] } it 'returns reversed body' do expect(processor.run(body)).to eql body.reverse end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
caramelize-1.1.1 | spec/lib/caramelize/filter_processor_spec.rb |
caramelize-1.1.0 | spec/lib/caramelize/filter_processor_spec.rb |
caramelize-1.0.0 | spec/lib/caramelize/filter_processor_spec.rb |