Sha256: f8f30e05df713f1e13ef92b2e30261b524f895dbc41f5cfbeb21ab9d08e95af3
Contents?: true
Size: 1011 Bytes
Versions: 1
Compression:
Stored size: 1011 Bytes
Contents
require 'spec_helper' describe VinQuery::Configuration do before do VinQuery.configure do |config| config.url = 'http://www.vinquery.com/asdf/asdf.aspx' config.access_code = 'asdf1234-asdf1234-asdf1234' end end it 'respects set values in a config block' do expect(VinQuery.configuration.url).to eq 'http://www.vinquery.com/asdf/asdf.aspx' expect(VinQuery.configuration.access_code).to eq 'asdf1234-asdf1234-asdf1234' end it 'has a default report type' do expect(VinQuery.configuration.report_type).to eq 2 end context 'when manually given options' do it 'overrides default configuration settings' do VinQuery.configuration.merge_options(report_type: 3) expect(VinQuery.configuration.report_type).to eq 3 end it 'overrides previously set configuration settings' do VinQuery.configuration.merge_options(access_code: '1234') expect(VinQuery.configuration.access_code).to eq '1234' end end after { VinQuery.reset } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vin_query-1.1.0 | spec/lib/vin_query/configuration_spec.rb |