Sha256: bdb6162aea085dd02bb5ee6712dccfa96c72f1ef1f42ba397032624a425210b1

Contents?: true

Size: 590 Bytes

Versions: 2

Compression:

Stored size: 590 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 eq val
      end
    end

    it 'should not allow bogus values' do
      %w(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

2 entries across 2 versions & 1 rubygems

Version Path
landable-1.14.0 spec/lib/landable/configuration_spec.rb
landable-1.13.2 spec/lib/landable/configuration_spec.rb