Sha256: 3bc61169c385282de1aadc2c4a5d938d4dbc34c87aa87d7f9cabb1a4e000a60d
Contents?: true
Size: 727 Bytes
Versions: 1
Compression:
Stored size: 727 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Caramelize::FilterProcessor do subject(:processor) { described_class.new(input_wiki) } let(:filters) { [] } let(:input_wiki) { double(filters:) } let(:body) { 'body' } 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
caramelize-1.2.0 | spec/lib/caramelize/filter_processor_spec.rb |