Class: RailsMocks::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/rails_mocks/rails.rb

Instance Method Summary collapse

Instance Method Details

#appObject



18
19
20
# File 'lib/rails_mocks/rails.rb', line 18

def app
  Rails.application
end

#insert_middlewareObject



10
11
12
# File 'lib/rails_mocks/rails.rb', line 10

def insert_middleware
  app.middleware.use RailsMocks::Middleware
end

#load_shared_contextsObject



14
15
16
# File 'lib/rails_mocks/rails.rb', line 14

def load_shared_contexts
  Dir[Rails.root.join('spec/support/shared_contexts/**/*.rb')].each { |f| require f }
end