1 $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
2 $:.unshift File.join(File.dirname(__FILE__), '..', '..')
8 require 'rbot/registry'
12 class PluginTest < Test::Unit::TestCase
14 manager = Irc::Bot::Plugins.manager
15 manager.bot_associate(MockBot.new)
16 manager.load_botmodule_file('./data/rbot/plugins/rot13.rb')
17 @plugin = manager.get_plugin('rot')
21 assert_not_nil(@plugin)
22 assert_equal(@plugin.help(nil), "rot13 <string> => encode <string> to rot13 or back")
24 @plugin.rot13(m, {string: 'Hello World'})
25 assert_equal(m.replies.first, 'Uryyb Jbeyq')