spec/motd_spec.rb in muzang-plugins-1.1.4 vs spec/motd_spec.rb in muzang-plugins-1.1.5
- old
+ new
@@ -1,18 +1,19 @@
require 'spec_helper'
require 'muzang-plugins/muzang-motd'
-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
+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: *Motd* ")
- @motd.call(@connection, @message)
+ 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
-