Sha256: e7b3ec0f9cd24fd948b65a9a9e562409b16b494c65ed70874990167624baeff0

Contents?: true

Size: 897 Bytes

Versions: 22

Compression:

Stored size: 897 Bytes

Contents

require 'spec_helper'

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

  its(:logger) { should be_a Logger }
  its(:debugging?) { should be_false }

  describe '.debug!' do
    before { FbGraph.debug! }
    its(:debugging?) { should be_true }
  end

  describe '.debug' do
    it 'should enable debugging within given block' do
      FbGraph.debug do
        Rack::OAuth2.debugging?.should be_true
        FbGraph.debugging?.should be_true
      end
      Rack::OAuth2.debugging?.should be_false
      FbGraph.debugging?.should be_false
    end

    it 'should not force disable debugging' do
      Rack::OAuth2.debug!
      FbGraph.debug!
      FbGraph.debug do
        Rack::OAuth2.debugging?.should be_true
        FbGraph.debugging?.should be_true
      end
      Rack::OAuth2.debugging?.should be_true
      FbGraph.debugging?.should be_true
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
fb_graph-2.3.1 spec/fb_graph_spec.rb
fb_graph-2.3.0 spec/fb_graph_spec.rb
fb_graph-2.2.6 spec/fb_graph_spec.rb
fb_graph-2.2.5 spec/fb_graph_spec.rb
fb_graph-2.2.4 spec/fb_graph_spec.rb
fb_graph-2.2.3 spec/fb_graph_spec.rb
fb_graph-2.2.2 spec/fb_graph_spec.rb
fb_graph-2.2.1 spec/fb_graph_spec.rb
fb_graph-2.2.0 spec/fb_graph_spec.rb
fb_graph-2.2.0.beta spec/fb_graph_spec.rb
fb_graph-2.2.0.alpha2 spec/fb_graph_spec.rb
fb_graph-2.2.0.alpha spec/fb_graph_spec.rb
fb_graph-2.1.13 spec/fb_graph_spec.rb
fb_graph-2.1.12 spec/fb_graph_spec.rb
fb_graph-2.1.11 spec/fb_graph_spec.rb
fb_graph-2.1.10 spec/fb_graph_spec.rb
fb_graph-2.1.9 spec/fb_graph_spec.rb
fb_graph-2.1.8 spec/fb_graph_spec.rb
fb_graph-2.1.7 spec/fb_graph_spec.rb
fb_graph-2.1.6 spec/fb_graph_spec.rb