Class: Rex::Proto::Http::Handler::Proc::UnitTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/rex/proto/http/handler/proc.rb.ut.rb

Constant Summary collapse

Klass =
Rex::Proto::Http::Handler::Proc
Request =
Rex::Proto::Http::Request

Instance Method Summary collapse

Instance Method Details

#test_procObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/rex/proto/http/handler/proc.rb.ut.rb', line 14

def test_proc
	cool = 0
	k = Klass.new(nil, Proc.new { |cli, req|
		cool = 1
	})
		
	r = k.on_request(nil, Request::Get.new("/erb.rb.ut.rb.rhtml"))

	assert_equal(1, cool)
end