class Cinch::Test::MockBot
Mock Class to avoid spinning up a real version of the chinch bot.
Attributes
mask[RW]
Public Class Methods
new(*)
click to toggle source
Calls superclass method
# File lib/cinch/test.rb, line 28 def initialize(*) super @irc = MockIRC.new(self) # Don't bother initing plugins if we didn't pass any. # (This is for testing any non-plugin cinch extensions) unless @config.plugins.plugins.empty? # auugh why # this sets up instances of the plugins provided. # by default this is done in #start, which also # overrides @irc and calls @irc.start, which does # network i/o. :( @plugins.register_plugins(@config.plugins.plugins) end # set the bot's hostmask @mask = 'foo!bar@baz' end