diff options
author | doki_pen <rcorsaro@optaros.com> | 2008-04-10 10:17:22 -0400 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-10 16:25:32 +0200 |
commit | 173c64800b2bf9b7a36c83eeadd74d974cb7ec15 (patch) | |
tree | e9ae21b7f124ecd8c6d1faec732040ca49b3bf4a | |
parent | 8bab7c7470a7f0d528332172177744953f2e9387 (diff) |
adds test for add_botmodules bug fix.
-rw-r--r-- | test/test_plugins_priority.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/test_plugins_priority.rb b/test/test_plugins_priority.rb index 75596558..b5d3450f 100644 --- a/test/test_plugins_priority.rb +++ b/test/test_plugins_priority.rb @@ -4,6 +4,7 @@ require 'test/unit' require 'rbot/config' require 'rbot/plugins' +require 'pp' include Irc::Bot::Plugins @@ -65,6 +66,7 @@ class PluginsPriorityTest < Test::Unit::TestCase # We add the modules to the lists in the wrong order # on purpose to make sure the sort is working @@manager.plugins.clear + @@manager.core_modules.clear @@manager.plugins << @mock1 @@manager.plugins << @mock4 @@manager.plugins << @mock3 @@ -161,7 +163,13 @@ class PluginsPriorityTest < Test::Unit::TestCase assert @mock3.connect_called_at.first < @mock4.connect_called_at.first assert @mock4.connect_called_at.first < @mock5.connect_called_at.first end -end - + def test_add_botmodule + @@manager.sort_modules + mock_n1 = MockModule.new(-1) + @@manager.add_botmodule mock_n1 + @@manager.delegate('test') + assert mock_n1.test_called_at.first < @mock1.test_called_at.first + end +end |