Sha256: ea5faf3773ede7ab0e73ccf4104220b8d23c3184c9e33ec9f106d0a5dd66ad20

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

require 'spec_helper'
require 'muzang-plugins/muzang-motd'

module Muzang::Plugins
  describe "Motd" do
    before do
      @message = OpenStruct.new({ :command => :join, :channel => "#test", :nick => "DRUG-bot" })
      @bot = stub
      @motd = Motd.new(@bot)
      @bot.stub(:plugins => { Motd => @motd })
      @connection = stub(:msg => true, :nick => "DRUG-bot")
    end

    it "should send message after join to channel" do
      @connection.should_receive(:msg).with("#test", "Muzang | Version: #{Muzang::VERSION} | Plugins: *Muzang::Plugins::Motd* ")
      @motd.call(@connection, @message)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
muzang-plugins-1.1.6 spec/motd_spec.rb
muzang-plugins-1.1.5 spec/motd_spec.rb