Sha256: b1afffcffd3926bd430a7940580358908191082bcb274166bc38513d6fffd9e7

Contents?: true

Size: 457 Bytes

Versions: 5

Compression:

Stored size: 457 Bytes

Contents

require 'robut/storage/hash_store'

class Robut::ConnectionMock < Robut::Connection

  def initialize(config = nil)
    self.config = config || self.class.config
    self.store = Robut::Storage::HashStore
  end

  def replies
    @replies ||= []
  end
  
  def reply(msg, to = nil)
    replies << msg
  end
  
  def handle_message(plugins, time, nick, message)
    messages << [time, nick, message]
  end
  
  def messages
    @messages ||= []
  end
  
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
robut_whois-0.0.2 spec/support/connection_mock.rb
robut_whois-0.0.1 spec/support/connection_mock.rb
robut-0.3.0 test/mocks/connection_mock.rb
robut-0.2.1 test/mocks/connection_mock.rb
robut-0.2.0 test/mocks/connection_mock.rb