webrat/spec/integration/sinatra/test/modular_app_test.rb
Simon Rozet 90baf3311c Sinatra now provides sensible options for testing
In the lastest release, 0.9.1:

* Set sensible defaults on Default for test env [1]
  5a33a9586f

* Set :environment to :test in TestHarness
  9af37724e0

* Set :environment to :test when Sinatra::Test is included
  93b19a3492

[1] Only Sinatra::Default provides special options for testing. If you subclass
    Sinatra::Base, you'll have to set them yourself.

foo
2009-03-08 23:41:34 +01:00

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