Module: Graphiti::Rails::GraphitiErrorsTesting

Includes:
RescueRegistry::RailsTestHelpers
Defined in:
lib/graphiti/rails/graphiti_errors_testing.rb

Instance Method Summary collapse

Instance Method Details

#disable!Object



12
13
14
15
16
17
# File 'lib/graphiti/rails/graphiti_errors_testing.rb', line 12

def disable!
  DEPRECATOR.deprecation_warning("GraphitiError.disable! in tests", "This method may cause leaked behavior between tests! Wrap in Graphiti::Rails::TestHelpers#handle_request_exceptions instead. Note that exceptions are no longer caught by default during testing.")
  handle_request_exceptions(false)
ensure
  super
end

#enable!Object



6
7
8
9
10
# File 'lib/graphiti/rails/graphiti_errors_testing.rb', line 6

def enable!
  DEPRECATOR.deprecation_warning("GraphitiError.enable! in tests", "This method may cause leaked behavior between tests! Wrap in Graphiti::Rails::TestHelpers#handle_request_exceptions instead.")
  super
  handle_request_exceptions(true)
end