Sha256: 150159be6526c99528b5baba6fd62da33e02e7f8be23af8d2717a772d2181b2c
Contents?: true
Size: 743 Bytes
Versions: 6
Compression:
Stored size: 743 Bytes
Contents
require 'spec_helper' describe Mailroute::Base do it 'should reload site if configuration is changed' do Mailroute.configure(:url => 'http://example.com') my_model = Class.new(Mailroute::Base) my_model.site.to_s.should == 'http://example.com' Mailroute.configure(:url => 'http://no.example.com') my_model.site.to_s.should == 'http://no.example.com' end it 'should reload authorization header if configuration is changed' do Mailroute.configure(:username => 'a', :apikey => 'b') my_model = Class.new(Mailroute::Base) my_model.headers['Authorization'].should == 'ApiKey a:b' Mailroute.configure(:username => 'c', :apikey => 'd') my_model.headers['Authorization'].should == 'ApiKey c:d' end end
Version data entries
6 entries across 6 versions & 1 rubygems