Sha256: a9ceaf1b6ae9f3219af2f36059b753142d697110942723fe11ba0714b8a5ec7c

Contents?: true

Size: 607 Bytes

Versions: 4

Compression:

Stored size: 607 Bytes

Contents

require 'spec_helper'

RSpec.describe ProxyPacRb::CodeConfiguration do
  it_behaves_like 'a basic configuration'

  describe '#use_proxy' do
    subject(:config) { described_class.new }

    context 'when default is used' do
      it { expect(config.use_proxy).to be false }
    end

    context 'when modified' do
      context 'when valid value' do
        before(:each) { config.use_proxy = true }
        it { expect(config.use_proxy).to be true }
      end

      context 'when invalid value' do
        it { expect {  config.use_proxy = '' }.to raise_error ArgumentError }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
proxy_pac_rb-0.8.2 spec/code_configuration_spec.rb
proxy_pac_rb-0.8.1 spec/code_configuration_spec.rb
proxy_pac_rb-0.8.0 spec/code_configuration_spec.rb
proxy_pac_rb-0.7.0 spec/code_configuration_spec.rb