Class: Cinch::Test::MockBot
- Inherits:
-
Bot
- Object
- Bot
- Cinch::Test::MockBot
- Defined in:
- lib/cinch/test.rb
Overview
Mock Class to avoid spinning up a real version of the chinch bot.
Instance Attribute Summary collapse
-
#mask ⇒ Object
Returns the value of attribute mask.
Instance Method Summary collapse
-
#initialize ⇒ MockBot
constructor
A new instance of MockBot.
Constructor Details
#initialize ⇒ MockBot
Returns a new instance of MockBot.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# 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 |
Instance Attribute Details
#mask ⇒ Object
Returns the value of attribute mask.
26 27 28 |
# File 'lib/cinch/test.rb', line 26 def mask @mask end |