Skip to content

Commit

Permalink
Add a workaround for NetBeans
Browse files Browse the repository at this point in the history
NetBeans should not use monkey patching. NetBeans should use runner
change public API.

GitHub: close #38

Reported by Marc Cooper. Thanks!!!
  • Loading branch information
kou committed Aug 17, 2012
1 parent 400f216 commit 5fbdba9
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions lib/test/unit/ui/testrunnermediator.rb
Expand Up @@ -50,6 +50,22 @@ def run
result
end

# Just for backward compatibility for NetBeans.
# NetBeans should not use monkey patching. NetBeans
# should use runner change public API.
#
# See GitHub#38
# https://github.com/test-unit/test-unit/issues/38
def run_suite(result=nil)
if result.nil?
run
else
@suite.run(result) do |channel, value|
notify_listeners(channel, value)
end
end
end

private
# A factory method to create the result the mediator
# should run with. Can be overridden by subclasses if
Expand Down Expand Up @@ -88,12 +104,6 @@ def with_listener(result)
pass_assertion_listener)
end
end

def run_suite(result)
@suite.run(result) do |channel, value|
notify_listeners(channel, value)
end
end
end
end
end
Expand Down

0 comments on commit 5fbdba9

Please sign in to comment.