Sha256: 611675a6c24ea95b4d6d8f7257b5303e018149f1442b89f30114dfd44a6de486

Contents?: true

Size: 686 Bytes

Versions: 5

Compression:

Stored size: 686 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
        FbGraph.debugging?.should be_true
      end
      FbGraph.debugging?.should be_false
    end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fb_graph-2.1.3 spec/fb_graph_spec.rb
fb_graph-2.1.2 spec/fb_graph_spec.rb
fb_graph-2.1.1 spec/fb_graph_spec.rb
fb_graph-2.1.0 spec/fb_graph_spec.rb
fb_graph-2.1.0.alpha spec/fb_graph_spec.rb