Sha256: f2cfd8511b499e01b8d4f3c355dccc52d3ed56dfb1e237ab7d65d45539095af4

Contents?: true

Size: 733 Bytes

Versions: 1

Compression:

Stored size: 733 Bytes

Contents

# frozen_string_literal: true

describe Sinclair::Configurable do
  describe '#yard' do
    before do
      MyConfigurable.configure do
        host 'interstella.com'
        port 5555
      end
    end

    after do
      MyConfigurable.reset_config
    end

    it 'sets right value for config host' do
      expect(MyConfigurable.config.host)
        .to eq('interstella.com')
    end

    it 'sets right value for config port' do
      expect(MyConfigurable.config.port)
        .to eq(5555)
    end

    context 'when reset_config is called' do
      before { MyConfigurable.reset_config }

      it 'returns initial value for host' do
        expect(MyConfigurable.config.host)
          .to be_nil
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinclair-1.3.1 spec/integration/yard/sinclair/configurable_spec.rb