Sha256: 7be93856894ddb0b3f9449aa2636832f75c5b81f5119f8d200de7dcd66946861
Contents?: true
Size: 955 Bytes
Versions: 2
Compression:
Stored size: 955 Bytes
Contents
require 'spec_helper' module Adjust module Core describe Configuration do context '#environment' do it 'defaults to sandbox' do expect(subject.environment).to eq :sandbox end it 'can be overriden' do subject.environment = :production expect(subject.environment).to eq :production end end context '#app_token' do it 'raises an exception if not set' do expect { subject.app_token }.to raise_error(MissingAppTokenError) end it 'can be set' do subject.app_token = :app_token expect(subject.app_token).to eq :app_token end end context '#to_hash' do before { subject.app_token = :app_token } it 'returns configs as a hash' do expect(subject.to_hash).to eq \ environment: :sandbox, app_token: :app_token end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
adjust-0.0.2 | spec/core/configuration_spec.rb |
adjust-0.0.1 | spec/core/configuration_spec.rb |