Sha256: 30221b25601eb49a57ca72c51215794f9d07bc8abdd40de1a9815b0ddba661b3

Contents?: true

Size: 671 Bytes

Versions: 8

Compression:

Stored size: 671 Bytes

Contents

require 'spec_helper'
require 'muzang-plugins/muzang-livereload'

describe "LiveReload" do
  before(:each) do
    @bot = stub
    @livereload = LiveReload.new(@bot)
    @bot.stub(:plugins => { LiveReload => @livereload })
    @connection = stub(:msg => true)
    Kernel.stub(:load)
    @message = OpenStruct.new({:channel => "#test", :message => "!reload"})
  end

  it "should load plugins" do
    Kernel.should_receive(:load).with('muzang-plugins/muzang-livereload.rb')
    @livereload.call(@connection, @message)
  end

  it "should create new instance of plugin" do
    LiveReload.should_receive(:new).with(@bot)
    @livereload.call(@connection, @message)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
muzang-plugins-1.1.4 spec/livereload_spec.rb
muzang-plugins-1.1.3 spec/livereload_spec.rb
muzang-plugins-1.1.2 spec/livereload_spec.rb
muzang-plugins-1.1.1 spec/livereload_spec.rb
muzang-plugins-1.1.0 spec/livereload_spec.rb
muzang-plugins-1.0.2 spec/livereload_spec.rb
muzang-plugins-1.0.1 spec/livereload_spec.rb
muzang-plugins-1.0.0 spec/livereload_spec.rb