Sha256: d5dd21f39f6de46e951a2138862cc6b93709fec03c87ca76967182981de3e515

Contents?: true

Size: 601 Bytes

Versions: 2

Compression:

Stored size: 601 Bytes

Contents

require "spec_helper"

describe ReverseAdoc::Converters do
  before { ReverseAdoc.config.unknown_tags = :raise }
  let(:converters) { ReverseAdoc::Converters }

  describe ".register and .unregister" do
    it "adds a converter mapping to the list" do
      expect do
        converters.lookup(:foo)
      end.to raise_error ReverseAdoc::UnknownTagError

      converters.register :foo, :foobar
      expect(converters.lookup(:foo)).to eq :foobar

      converters.unregister :foo
      expect do
        converters.lookup(:foo)
      end.to raise_error ReverseAdoc::UnknownTagError
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reverse_adoc-1.0.1 spec/lib/reverse_adoc/converters_spec.rb
reverse_adoc-1.0.0 spec/lib/reverse_adoc/converters_spec.rb