Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (26 sloc) 1.02 KB
Feature: Use the notifier in a Sinatra app
Given I have built and installed the "hoptoad_notifier" gem
Scenario: Rescue an exception in a Sinatra app
Given the following Rack app:
require 'sinatra/base'
require 'hoptoad_notifier'
HoptoadNotifier.configure do |config|
config.api_key = 'my_api_key'
class FontaneApp < Sinatra::Default
use HoptoadNotifier::Rack
enable :raise_errors
get "/test/index" do
raise "Sinatra has left the building"
app = FontaneApp
When I perform a Rack request to ""
Then I should receive the following Hoptoad notification:
| error message | RuntimeError: Sinatra has left the building |
| error class | RuntimeError |
| parameters | param: value |
| url | |
Jump to Line
Something went wrong with that request. Please try again.