Sha256: 077581ecd34388e587fe2f2271c01fbe673bf6c824fe26cad0c35081cde225df

Contents?: true

Size: 601 Bytes

Versions: 16

Compression:

Stored size: 601 Bytes

Contents

require 'spec_helper'

describe Landable::Configuration do

  describe 'traffic_enabled' do
    it 'should allow :all, true, false, :html' do
      [:all, true, false, :html].each do |val|
        expect { subject.traffic_enabled = val }.to_not raise_error
        subject.traffic_enabled.should == val
      end
    end

    it 'should not allow bogus values' do
      ['foo', 'baz', 'all', 'false'].each do |val|
        expect { subject.traffic_enabled = val }.to raise_error(ArgumentError, 'Landable::Configuration#traffic_enabled accepts false, true, :all or :html')
      end
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.13.1 spec/lib/landable/configuration_spec.rb
landable-1.12.3 spec/lib/landable/configuration_spec.rb
landable-1.12.2 spec/lib/landable/configuration_spec.rb
landable-1.12.1 spec/lib/landable/configuration_spec.rb
landable-1.11.1 spec/lib/landable/configuration_spec.rb
landable-1.11.0 spec/lib/landable/configuration_spec.rb
landable-1.10.0.rc2 spec/lib/landable/configuration_spec.rb
landable-1.10.0.rc1 spec/lib/landable/configuration_spec.rb
landable-1.9.2 spec/lib/landable/configuration_spec.rb
landable-1.9.1 spec/lib/landable/configuration_spec.rb
landable-1.9.0 spec/lib/landable/configuration_spec.rb
landable-1.9.0.rc2 spec/lib/landable/configuration_spec.rb
landable-1.9.0.rc1 spec/lib/landable/configuration_spec.rb
landable-1.8.0 spec/lib/landable/configuration_spec.rb
landable-1.7.1.rc1 spec/lib/landable/configuration_spec.rb
landable-1.7.0 spec/lib/landable/configuration_spec.rb