Using with Rack
Hyperspec will run with Rails out of the box, but you can also use Hyperspec with any Rack application, with just a little more setup. For example here is a sample configuration setup with Sinatra:
Details
The interface between Hyperspec and your application environment is defined by the HyperspecTestController
class. This file typically includes a set of helper methods from HyperSpec::ControllerHelpers
, which can then be overridden to give whatever behavior your specific framework needs. Have a look at the hyper-spec/rack.rb
and hyper-spec/controller_helpers.rb
files in the Hyperspec gem directory.
Example
A complete (but very simple) example is in this repos ruby/examples/misc/sinatra_app
directory
Last updated