Sha256: 65ca4f39e7929f58746188b05cc300648969da5bdf8d1401ed6a8f62235b06d3

Contents?: true

Size: 507 Bytes

Versions: 3

Compression:

Stored size: 507 Bytes

Contents

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

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

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

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
robut-0.3.0 test/unit/plugin/ping_test.rb
robut-0.2.1 test/unit/plugin/ping_test.rb
robut-0.2.0 test/unit/plugin/ping_test.rb