Sha256: 3c846dcc56c30b5562e4524e4b37f736d55e6ff6645d46e8093c276fa3f3a428

Contents?: true

Size: 701 Bytes

Versions: 10

Compression:

Stored size: 701 Bytes

Contents

require 'spec_helper'

describe ReverseAsciidoctor::Config do
  describe '#with' do
    let(:config) { ReverseAsciidoctor.config }

    it 'takes additional options into account' do
      config.with(tag_border: :foobar) do
        expect(ReverseAsciidoctor.config.tag_border).to eq :foobar
      end
    end

    it 'returns the result of a given block' do
      expect(config.with { :something }).to eq :something
    end

    it 'resets to original settings afterwards' do
      config.tag_border = :foo
      config.with(tag_border: :bar) do
        expect(ReverseAsciidoctor.config.tag_border).to eq :bar
      end
      expect(ReverseAsciidoctor.config.tag_border).to eq :foo
    end

  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
reverse_adoc-0.2.8 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_adoc-0.2.7 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_adoc-0.2.6 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_adoc-0.2.5 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_adoc-0.2.4 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_adoc-0.2.3 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_asciidoctor-0.2.2 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_asciidoctor-0.2.1 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_asciidoctor-0.2.0 spec/lib/reverse_asciidoctor/config_spec.rb
reverse_asciidoctor-0.1.0 spec/lib/reverse_asciidoctor/config_spec.rb