spec/spec_helper.rb in gaffe-1.1.0 vs spec/spec_helper.rb in gaffe-1.2.0
- old
+ new
@@ -1,10 +1,12 @@
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'rspec'
require 'action_controller/railtie'
require 'gaffe'
+require_relative './application_controller_helper'
+require 'gaffe/errors_controller'
RSpec.configure do |config|
# Disable `should` syntax
config.expect_with :rspec do |c|
c.syntax = :expect
@@ -21,13 +23,9 @@
# Make sure we clear memoized variables before each test
[:@configuration].each do |variable|
Gaffe.send :remove_instance_variable, variable if Gaffe.instance_variable_defined?(variable)
end
end
-end
-
-# We need a fake "ApplicationController" because Gaffe's default controller inherits from it
-class ApplicationController < ActionController::Base
end
def test_request
if Rails::VERSION::MAJOR >= 5
ActionDispatch::TestRequest.create