Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 26 lines (22 sloc) 0.58 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
begin
  require 'test/spec'
rescue LoadError
  require 'rubygems'
  require 'test/spec'
end

$:.unshift File.dirname(File.dirname(__FILE__)) + '/lib'
require 'sinatra/base'
require 'sinatra/test'
require 'sinatra/test/spec'

module Sinatra::Test
  # Sets up a Sinatra::Base subclass defined with the block
  # given. Used in setup or individual spec methods to establish
  # the application.
  def mock_app(base=Sinatra::Base, &block)
    @app = Sinatra.new(base, &block)
  end
end

class Sinatra::Base
  # Allow assertions in request context
  include Test::Unit::Assertions
end
Something went wrong with that request. Please try again.