Sha256: 8b2de13832a034e0790a905a251bb04548c977433c3635c70ecb8ecbec64fb47

Contents?: true

Size: 690 Bytes

Versions: 12

Compression:

Stored size: 690 Bytes

Contents

ENV['RACK_ENV'] = 'test'

require 'rspec/core'
require 'rack/test'

RSpec.configure do |config|
  config.expect_with :rspec do |expect|
    expect.syntax = :expect
  end
end

RSpec.describe 'omniauth' do
  include Rack::Test::Methods

  def app
    MyApplication
  end

  let(:stdout) { StringIO.new }

  around(:each) do |example|
    original_stdout = $stdout
    $stdout = stdout
    require_relative 'app'
    example.run
    $stdout = original_stdout
  end

  it 'does not log anything to STDOUT when initializing' do
    expect(stdout.string).to eq('')
  end

  it 'works' do
    get '/'
    expect(last_response).to be_ok
    expect(last_response.body).to eq 'Hello World'
  end
end

Version data entries

12 entries across 11 versions & 3 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/hashie-3.6.0/spec/integration/omniauth/integration_spec.rb
hashie-4.0.0 spec/integration/omniauth/integration_spec.rb
hashie-3.6.0 spec/integration/omniauth/integration_spec.rb
tdiary-5.0.8 vendor/bundle/gems/hashie-3.5.7/spec/integration/omniauth/integration_spec.rb
hashie-3.5.7 spec/integration/omniauth/integration_spec.rb
hashie-3.5.6 spec/integration/omniauth/integration_spec.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/hashie-3.5.5/spec/integration/omniauth/integration_spec.rb
tdiary-5.0.5 vendor/bundle/gems/hashie-3.5.5/spec/integration/omniauth/integration_spec.rb
tdiary-5.0.4 vendor/bundle/gems/hashie-3.5.5/spec/integration/omniauth/integration_spec.rb
hashie-3.5.5 spec/integration/omniauth/integration_spec.rb
hashie-3.5.4 spec/integration/omniauth/integration_spec.rb
hashie-3.5.3 spec/integration/omniauth/integration_spec.rb