Module: Raygun::Testable

Included in:
Raygun
Defined in:
lib/raygun/testable.rb

Instance Method Summary collapse

Instance Method Details

#track_test_exceptionObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/raygun/testable.rb', line 7

def track_test_exception
  Raygun.configuration.silence_reporting = false
  raise ItWorksException.new("Woohoo! Your Raygun<->Ruby connection is set up correctly")
rescue ItWorksException => e
  response = Raygun.track_exception(e)

  if response.success?
    puts "Success! Now go check your Raygun.io Dashboard"
  else
    puts "Oh-oh, something went wrong - double check your API key"
    puts "API Key - " << Raygun.configuration.api_key << ")"
    puts "API Response - " << response
  end
end