2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-11-24 02:02:10 +00:00
|
|
|
|
|
|
|
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..'))
|
|
|
|
|
|
|
|
require 'test/unit'
|
|
|
|
require 'rex/proto/http'
|
|
|
|
|
|
|
|
class Rex::Proto::Http::Handler::Erb::UnitTest < Test::Unit::TestCase
|
|
|
|
|
|
|
|
Klass = Rex::Proto::Http::Handler::Erb
|
|
|
|
Request = Rex::Proto::Http::Request
|
|
|
|
|
|
|
|
def test_erb
|
|
|
|
k = Klass.new(nil, File.dirname(__FILE__))
|
|
|
|
r = k.on_request(nil, Request::Get.new("/erb.rb.ut.rb.rhtml"))
|
|
|
|
|
|
|
|
assert_not_nil(r)
|
|
|
|
assert_equal("foo 4\n", r.body)
|
|
|
|
end
|
|
|
|
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|