2009-02-22 00:07:15 +00:00
|
|
|
require File.dirname(__FILE__) + "/test_helper"
|
|
|
|
require File.dirname(__FILE__) + "/../modular_app"
|
|
|
|
|
|
|
|
class MyModularAppTest < Test::Unit::TestCase
|
|
|
|
def app
|
|
|
|
MyModularApp.tap { |app|
|
|
|
|
app.disable :run, :reload
|
|
|
|
app.set :environment, :test
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_it_works
|
|
|
|
visit "/"
|
|
|
|
assert_contain "Hello World"
|
|
|
|
end
|
2009-02-22 06:04:30 +00:00
|
|
|
|
|
|
|
def test_redirects
|
|
|
|
visit "/redirect_absolute_url"
|
|
|
|
assert_equal "spam", response_body
|
|
|
|
end
|
2009-02-22 00:07:15 +00:00
|
|
|
end
|