Sha256: f01dc373c86bcebf1b835bef15511d29219443ab05a77dabeb1136049b317e45
Contents?: true
Size: 602 Bytes
Versions: 12
Compression:
Stored size: 602 Bytes
Contents
ENV['RAILS_ENV'] = 'test' require 'rspec/core' RSpec.describe 'omniauth-oauth2 inside of rails', type: :request do let(:stdout) { StringIO.new } around(:each) do |example| original_stdout = $stdout $stdout = stdout require_relative 'app' require 'rspec/rails' example.run $stdout = original_stdout end it 'does not log anything to STDOUT when initializing a Rails app and is set to Rails logger' do expect(stdout.string).to eq('') expect(Hashie.logger).to eq(Rails.logger) end it 'works' do get '/' assert_select 'h1', 'Hello, world!' end end
Version data entries
12 entries across 11 versions & 3 rubygems