Sha256: 14237e7ed3cb0801100a293899e7bcf63d7011a609a54605d71757c435a4c915

Contents?: true

Size: 741 Bytes

Versions: 15

Compression:

Stored size: 741 Bytes

Contents

require 'spec_helper'

describe Rack::OAuth2 do
  subject { Rack::OAuth2 }
  after { Rack::OAuth2.debugging = false }

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

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

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

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rack-oauth2-0.14.5 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.14.4 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.14.3 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.14.2 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.14.1 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.14.0 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.13.0 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.12.2 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.12.1 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.12.0 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.11.0 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.10.1 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.10.0 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.10.0.alpha spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-0.9.5 spec/rack/oauth2/oauth2_spec.rb