summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMatthew Rudy Jacobs <matthewrudyjacobs@gmail.com>2017-02-10 18:24:03 -0500
committerdblock <dblock@dblock.org>2017-02-10 18:26:31 -0500
commitc269a1cc98c69848bd490f5024d884775061df6f (patch)
treefe6d3df5cc4c2c987786ba264dca1756cb7169d3 /spec
parent74b3bd6ab6fb83d1d19876661eae5f68433d35b1 (diff)
downloadhashie-c269a1cc98c69848bd490f5024d884775061df6f.tar.gz
Fix #401: use a Railtie to set Hashie.logger on rails boot.
Diffstat (limited to 'spec')
-rw-r--r--spec/integration/omniauth-oauth2/integration_spec.rb5
-rw-r--r--spec/integration/rails/integration_spec.rb6
2 files changed, 7 insertions, 4 deletions
diff --git a/spec/integration/omniauth-oauth2/integration_spec.rb b/spec/integration/omniauth-oauth2/integration_spec.rb
index d78ca28..3f3df8f 100644
--- a/spec/integration/omniauth-oauth2/integration_spec.rb
+++ b/spec/integration/omniauth-oauth2/integration_spec.rb
@@ -62,9 +62,10 @@ Rails.application.config.middleware.use OmniAuth::Builder do
provider :some_site
end
-RailsApp::Application.initialize!
-
+# the order is important
+# hashie must be loaded first to register the railtie
require 'hashie'
+RailsApp::Application.initialize!
RSpec.describe 'the Hashie logger' do
it 'is set to the Rails logger' do
diff --git a/spec/integration/rails/integration_spec.rb b/spec/integration/rails/integration_spec.rb
index 87ff1fc..6c00b86 100644
--- a/spec/integration/rails/integration_spec.rb
+++ b/spec/integration/rails/integration_spec.rb
@@ -55,9 +55,11 @@ class ApplicationController < ActionController::Base
end
end
-RailsApp::Application.initialize!
-
+# the order is important
+# hashie must be loaded first to register the railtie
+# then we can initialize
require 'hashie'
+RailsApp::Application.initialize!
RSpec.describe 'the Hashie logger' do
it 'is set to the Rails logger' do