Sha256: 3618ff47937a31efbed7af4588a1f8245eadb27c830c36d20f46bfbe23b89b16

Contents?: true

Size: 741 Bytes

Versions: 8

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 == false }

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

  describe '.debug' do
    it 'should enable debugging within given block' do
      Rack::OAuth2.debug do
        Rack::OAuth2.debugging?.should == true
      end
      Rack::OAuth2.debugging?.should == false
    end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rack-oauth2-2.2.1 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-2.2.0 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-2.1.0 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-2.0.1 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-2.0.0 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-2.0.0.rc3 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-2.0.0.rc2 spec/rack/oauth2/oauth2_spec.rb
rack-oauth2-2.0.0.rc1 spec/rack/oauth2/oauth2_spec.rb