Sha256: 8c6fc454a008cdad35fc2e6d7b04bed0ec97b46905e8218e3d1f1c404b6c667e

Contents?: true

Size: 551 Bytes

Versions: 13

Compression:

Stored size: 551 Bytes

Contents

require File.expand_path('../../spec_helper', __FILE__)

describe OmniAuth::Builder do
  describe '#provider' do
    it 'should translate a symbol to a constant' do
      OmniAuth::Strategies.should_receive(:const_get).with('MyStrategy').and_return(Class.new)
      OmniAuth::Builder.new(nil) do
        provider :my_strategy
      end
    end

    it 'should also just accept a class' do
      class ::ExampleClass; end

      lambda{ OmniAuth::Builder.new(nil) do
        provider ::ExampleClass
      end }.should_not raise_error
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
omniauth-1.0.0 spec/omniauth/builder_spec.rb
omniauth-1.0.0.rc2 spec/omniauth/builder_spec.rb
omniauth-1.0.0.rc1 spec/omniauth/builder_spec.rb
oa-core-0.3.2 spec/omniauth/builder_spec.rb
omniauth-1.0.0.beta1 spec/omniauth/builder_spec.rb
omniauth-1.0.0.pr2 spec/omniauth/builder_spec.rb
omniauth-1.0.0.pr1 spec/omniauth/builder_spec.rb
oa-core-0.3.0 spec/omniauth/builder_spec.rb
oa-core-0.3.0.rc3 spec/omniauth/builder_spec.rb
omniauth-0.2.6 oa-core/spec/omniauth/builder_spec.rb
oa-core-0.2.6 spec/omniauth/builder_spec.rb
omniauth-0.2.5 oa-core/spec/omniauth/builder_spec.rb
oa-core-0.2.5 spec/omniauth/builder_spec.rb