It's my kind of town! - Sinatra
Yeah, we're real clever. We're also from "The city in mid-west best city in the whole wide wide world" ... which makes us double the clever.
Sinatra runtime app
In your Sinatra app, do this:
And you'll get some helpful Sinatra extensions and helpers.
If you're Sinatra app is considered modular - as in, you are not using the
Sinatra::Default app - you will want to add the following in your app:
YourApp < Sinatra::Base register Sinatra::Chicago # for some DSL helpers helpers Sinatra::Chicago::Helpers # for standard helpers helpers Sinatra::Chicago::Responders # for JSON assistance end
You don't necessarily need all of them. You just need to "include" the statements that mix-in the functionality you want.
Assuming you have required 'rack/test', like so:
This is because these macros use last_request defined by the Rack/Test library. If you're using Shoulda in your tests of your Sinatra app, do this:
... and you'll get a bunch of cool Shoulda macros for testing specific Sinatra stuff.