Sha256: bab1cff8c8b709d1005678b00964ddf793d05e6e38275efa6e8eea24245aac52
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require 'spec_helper' describe Capgun::Config do subject do Capgun end describe '#configure' do specify "yields self to be configured" do subject.configure do |config| config.endpoint = 'http://example.com/api' end subject.endpoint.should == 'http://example.com/api' end end describe '.options' do specify "returns a hash of default capgun options" do subject.options.should == { :adapter => :net_http, :auth_token => "", :connection_options => {}, :endpoint => "http://example.com/api", :gateway => nil, :proxy => nil, :user_agent => "Capgun.io Ruby Gem 0.1.1" } end end describe '.reset' do specify "resets to the default capgun options" do subject.configure do |config| config.endpoint = 'http://example.com/api' end subject.endpoint.should == 'http://example.com/api' subject.reset subject.endpoint.should == 'https://api.capgun.io' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capgun-0.1.1 | spec/capgun/config_spec.rb |