Sha256: ac0d0a50e32dc7d2bd07355b0696a0001d93d5f8085498104235d80e1a48c753

Contents?: true

Size: 1.03 KB

Versions: 13

Compression:

Stored size: 1.03 KB

Contents

# encoding: utf-8
require 'spec_helper'

describe PassaporteWeb do

  it 'should have a version number' do
    PassaporteWeb::VERSION.should_not be_nil
  end

  describe 'configuration' do
    it 'should be done via block initialization' do
      PassaporteWeb.configure do |c|
        c.url = 'http://some/where'
        c.user_agent = 'My App v1.0'
        c.application_token = 'some-app-token'
        c.application_secret = 'some-app-secret'
        c.user_token = nil
      end
      PassaporteWeb.configuration.url.should == 'http://some/where'
      PassaporteWeb.configuration.user_agent.should == 'My App v1.0'
      PassaporteWeb.configuration.application_token.should == 'some-app-token'
      PassaporteWeb.configuration.application_secret.should == 'some-app-secret'
      PassaporteWeb.configuration.user_token.should be_nil
    end
    it 'should use a singleton object for the configuration values' do
      config1 = PassaporteWeb.configuration
      config2 = PassaporteWeb.configuration
      config1.should === config2
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
passaporteweb-client-0.0.20 spec/passaporte_web_spec.rb
passaporteweb-client-0.2.0 spec/passaporte_web_spec.rb
passaporteweb-client-0.1.0 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.19 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.18 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.17 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.16 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.15 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.14 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.13 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.12 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.11 spec/passaporte_web_spec.rb
passaporteweb-client-0.0.10 spec/passaporte_web_spec.rb