Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 4637c0e84b
Fetching contributors…

Cannot retrieve contributors at this time

file 28 lines (23 sloc) 0.538 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 26 27 28
$:.unshift File.join(File.dirname(__FILE__), '..')
require "rubygems"
require "sinatrails"
require "webrat"
require "rack/test"
require "test/unit"
# require "active_support/test_case"

Webrat.configure do |config|
  config.mode = :rack
end

class Test::Unit::TestCase
  include Webrat::Methods
  include Rack::Test::Methods

  def app
    @app ||= self.class.const_get(:MyApp).to_app
  end

  def assert_body(body)
    assert_equal body, last_response.body
  end

  def assert_missing
    assert_equal 404, last_response.status
  end
end
Something went wrong with that request. Please try again.