2009-04-15 02:19:57 +00:00
|
|
|
require "rubygems"
|
|
|
|
require "test/unit"
|
|
|
|
require "rack/test"
|
2009-06-15 04:03:46 +00:00
|
|
|
# require "redgreen"
|
2009-04-15 02:19:57 +00:00
|
|
|
|
|
|
|
require File.dirname(__FILE__) + "/../../../../lib/webrat"
|
2009-06-24 16:18:46 +00:00
|
|
|
require File.dirname(__FILE__) + "/../app"
|
2009-04-15 02:19:57 +00:00
|
|
|
|
|
|
|
Webrat.configure do |config|
|
2009-06-12 19:04:14 +00:00
|
|
|
config.mode = :rack
|
2009-04-15 02:19:57 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Test::Unit::TestCase
|
|
|
|
include Rack::Test::Methods
|
|
|
|
include Webrat::Methods
|
|
|
|
include Webrat::Matchers
|
2009-06-24 16:18:46 +00:00
|
|
|
include Webrat::HaveTagMatcher
|
2009-05-11 05:27:04 +00:00
|
|
|
|
2009-04-15 02:19:57 +00:00
|
|
|
def app
|
2009-06-05 16:09:31 +00:00
|
|
|
Rack::Builder.new {
|
|
|
|
use Rack::Lint
|
|
|
|
run RackApp.new
|
|
|
|
}
|
2009-04-15 02:19:57 +00:00
|
|
|
end
|
|
|
|
end
|