90baf3311c
In the lastest release, 0.9.1: * Set sensible defaults on Default for test env [1]5a33a9586f
* Set :environment to :test in TestHarness9af37724e0
* Set :environment to :test when Sinatra::Test is included93b19a3492
[1] Only Sinatra::Default provides special options for testing. If you subclass Sinatra::Base, you'll have to set them yourself. foo
19 lines
359 B
Ruby
19 lines
359 B
Ruby
require File.dirname(__FILE__) + "/test_helper"
|
|
require File.dirname(__FILE__) + "/../modular_app"
|
|
|
|
class MyModularAppTest < Test::Unit::TestCase
|
|
def app
|
|
MyModularApp
|
|
end
|
|
|
|
def test_it_works
|
|
visit "/"
|
|
assert_contain "Hello World"
|
|
end
|
|
|
|
def test_redirects
|
|
visit "/redirect_absolute_url"
|
|
assert_equal "spam", response_body
|
|
end
|
|
end
|