Sha256: 0e2589c1c1c1d502605cf0f7c2bf8a21922d24b4e5f15f916f2cce505f8311b6

Contents?: true

Size: 554 Bytes

Versions: 11

Compression:

Stored size: 554 Bytes

Contents

require 'test_helper'
require 'robut/plugin/ping'

class Robut::Plugin::PingTest < Test::Unit::TestCase

  def setup
    @connection = Robut::ConnectionMock.new
    @presence = Robut::PresenceMock.new(@connection)
    @plugin = Robut::Plugin::Ping.new(@presence)
  end

  def test_replies_wih_pong
    @plugin.handle(Time.now, "@john", "@robut ping")
    assert_equal ["pong"], @plugin.reply_to.replies
  end

  def test_replies_wih_sec
    @plugin.handle(Time.now, "@john", "@robut ping pong")
    assert_equal [], @plugin.reply_to.replies
  end
  
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
sclemmer-robut-0.6.3 test/unit/plugin/ping_test.rb
sclemmer-robut-0.6.2 test/unit/plugin/ping_test.rb
sclemmer-robut-0.6.1 test/unit/plugin/ping_test.rb
sclemmer-robut-0.6.0 test/unit/plugin/ping_test.rb
sclemmer-robut-0.5.4 test/unit/plugin/ping_test.rb
sclemmer-robut-0.5.3 test/unit/plugin/ping_test.rb
sclemmer-robut-0.5.2 test/unit/plugin/ping_test.rb
robut-0.5.2 test/unit/plugin/ping_test.rb
robut-0.5.1 test/unit/plugin/ping_test.rb
robut-0.5.0 test/unit/plugin/ping_test.rb
robut-0.4.0 test/unit/plugin/ping_test.rb