Sha256: 2cd2109ceb7389ec7785641c4a1c089d6a87058fa2e0d5b19a47959b46a3e065

Contents?: true

Size: 448 Bytes

Versions: 4

Compression:

Stored size: 448 Bytes

Contents

require File.dirname(__FILE__) + "/../../helper"

class TestGreeting < Test::Unit::TestCase
  include Biobot::Commands::Greeting

  def test_handle_message
    %w{hello hi hey sup greetings}.each do |msg|
      incoming = mock_message('dude@localhost', msg)
      assert_equal 'Hello there!', handle_greeting(incoming)
    end

    incoming = mock_message('dude@localhost', 'unmatching')
    assert_equal false, handle_greeting(incoming)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
viking-biobot-0.0.1 test/biobot/commands/test_greeting.rb
viking-biobot-0.0.2 test/biobot/commands/test_greeting.rb
viking-biobot-0.0.3 test/biobot/commands/test_greeting.rb
viking-biobot-0.0.4 test/biobot/commands/test_greeting.rb