Sha256: 52af34222db0d52a27d10127ededb34880b66ab4f4780385ba0ca86e2f5cee29

Contents?: true

Size: 1.2 KB

Versions: 14

Compression:

Stored size: 1.2 KB

Contents

require 'spec_helper'

describe FbGraph2 do
  subject { FbGraph2 }
  after { FbGraph2.debugging = false }

  context 'as default' do
    its(:logger) { should be_a Logger }
    its(:api_version) { should == 'v2.0' }
    its(:root_url) { should == 'https://graph.facebook.com' }
    its(:object_classes) { should contain_exactly *FbGraph2::Node.subclasses }
    it { should_not be_debugging }
  end

  describe '.debug!' do
    before { FbGraph2.debug! }
    it { should be_debugging }
  end

  describe '.http_client' do
    context 'with http_config' do
      before do
        FbGraph2.http_config do |config|
          config.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
          config.connect_timeout = 30
          config.send_timeout    = 40
          config.receive_timeout = 60
        end
      end

      it 'should configure Rack::OAuth2 and FbGraph2 http_client' do
        [Rack::OAuth2, FbGraph2].each do |klass|
          klass.http_client.ssl_config.verify_mode.should == OpenSSL::SSL::VERIFY_NONE
          klass.http_client.connect_timeout.should == 30
          klass.http_client.send_timeout.should    == 40
          klass.http_client.receive_timeout.should == 60
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fb_graph2-0.4.1 spec/fb_graph2_spec.rb
fb_graph2-0.4.0 spec/fb_graph2_spec.rb
fb_graph2-0.3.2 spec/fb_graph2_spec.rb
fb_graph2-0.3.1 spec/fb_graph2_spec.rb
fb_graph2-0.3.0 spec/fb_graph2_spec.rb
fb_graph2-0.2.0 spec/fb_graph2_spec.rb
fb_graph2-0.1.3 spec/fb_graph2_spec.rb
fb_graph2-0.1.2 spec/fb_graph2_spec.rb
fb_graph2-0.1.1 spec/fb_graph2_spec.rb
fb_graph2-0.1.0 spec/fb_graph2_spec.rb
fb_graph2-0.0.11 spec/fb_graph2_spec.rb
fb_graph2-0.0.10 spec/fb_graph2_spec.rb
fb_graph2-0.0.9 spec/fb_graph2_spec.rb
fb_graph2-0.0.8 spec/fb_graph2_spec.rb