Sha256: 628325de0b440e0ab929d35ae23665ba4c48b0ee248d0cbf4163971cfed4c6da
Contents?: true
Size: 809 Bytes
Versions: 1
Compression:
Stored size: 809 Bytes
Contents
require File.dirname(__FILE__) + "/../helper" module Roflbot class TestSentenceBot < Test::Unit::TestCase def setup super @options = { "accounts" => { "AIM" => {"username" => 'dudeguy', "password" => 'password'}, "Twitter" => { "token" => "abcdef", "secret" => "123456" } }, "sentences" => ["Hey (noun), (ending)"], "noun" => %w{dude guy}, "ending" => ["sup?", "I love you."] } end def test_base_superclass assert_equal Base, SentenceBot.superclass end def test_responses bot = SentenceBot.new(@options) @buddy.expects(:send_im).times(100).with do |message| message =~ /^Hey (dude|guy), (sup\?|I love you.)$/ end 100.times { |_| receive_im("hey") } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roflbot-0.0.3 | test/roflbot/test_sentence_bot.rb |