Use a SyntaxError instead of JumpError
Since the 1.8.7 behavior is insane. Also adds a require for msf/core so this spec can run by itself.unstable
parent
3640a344d4
commit
3205941a59
|
@ -1,4 +1,5 @@
|
|||
|
||||
require 'msf/core'
|
||||
require 'msf/core/task_manager'
|
||||
|
||||
describe Msf::TaskManager do
|
||||
|
@ -87,11 +88,11 @@ describe Msf::TaskManager do
|
|||
t.status.should == :dropped
|
||||
t.exception.class.should == ::NoMethodError
|
||||
|
||||
t = Msf::TaskManager::Task.new(Proc.new { return 12345 })
|
||||
t = Msf::TaskManager::Task.new(Proc.new { eval "'" })
|
||||
tm.queue_task(t)
|
||||
t.wait
|
||||
t.status.should == :dropped
|
||||
t.exception.should be_a ::LocalJumpError
|
||||
t.exception.should be_a ::SyntaxError
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue