Sha256: 06a51a13c5fa678d009adbcd9e5fb544b801f6a929711c67ad56442a8fa095be

Contents?: true

Size: 615 Bytes

Versions: 11

Compression:

Stored size: 615 Bytes

Contents

if defined? OmniAuth
  ###
  # Tell OmniAuth to just return whatever hash we want for each auth type
  #
  OmniAuth.config.test_mode            = true
  OmniAuth.config.mock_auth[:facebook] = MockAuthentication::Facebook.user

  ###
  # Except we don't want OmniAuth to fake anything when doing live tests
  #
  RSpec.configure do |config|
    config.before(:each, :js => true) do
      @previous_omniauth_test_mode = OmniAuth.config.test_mode

      OmniAuth.config.test_mode = false
    end

    config.after(:each, :js => true) do
      OmniAuth.config.test_mode = @previous_omniauth_test_mode
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rspectacular-0.9.2 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.9.1 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.9.0 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.8.0 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.7.0 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.6.1 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.5.0 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.4.0 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.3.0 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.2.0 lib/rspectacular/plugins/omniauth.rb
rspectacular-0.1.0 lib/rspectacular/plugins/omniauth.rb