Sha256: 9792f9a73bff670d0e404c3f33395e900a6aeb5b45040b11921f88069c6f2051

Contents?: true

Size: 1.08 KB

Versions: 13

Compression:

Stored size: 1.08 KB

Contents

require 'spec_helper'

describe OpenIDConnect do
  after { OpenIDConnect.debugging = false }

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

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

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

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
openid_connect-0.0.33 spec/openid_connect_spec.rb
openid_connect-0.0.32 spec/openid_connect_spec.rb
openid_connect-0.0.31 spec/openid_connect_spec.rb
openid_connect-0.0.30 spec/openid_connect_spec.rb
openid_connect-0.0.29 spec/openid_connect_spec.rb
openid_connect-0.0.28 spec/openid_connect_spec.rb
openid_connect-0.0.27 spec/openid_connect_spec.rb
openid_connect-0.0.26 spec/openid_connect_spec.rb
openid_connect-0.0.25 spec/openid_connect_spec.rb
openid_connect-0.0.24 spec/openid_connect_spec.rb
openid_connect-0.0.23 spec/openid_connect_spec.rb
openid_connect-0.0.22 spec/openid_connect_spec.rb
openid_connect-0.0.21 spec/openid_connect_spec.rb