Skip to content
This repository
tree: a01a8eef5d
Fetching contributors…

Cannot retrieve contributors at this time

file 20 lines (16 sloc) 0.472 kb

Testing with Bacon

After installing [Bacon][bc], setting it up works similar to Test::Unit:

ENV['RACK_ENV'] = 'test'
require 'bacon'
require 'rack/test'

  require_relative 'my-app.rb'
rescue NameError
  require File.expand_path('my-app.rb', __FILE__)

module TestMixin
  include Rack::Test::Methods
  Bacon::Context.send(:include, self)
  def app() Sinatra::Application end
Something went wrong with that request. Please try again.