Sha256: a4eb35a0e4d5a6e90011b2c1b7bf647d00f99321e0e44d07fca6003da80144c3

Contents?: true

Size: 637 Bytes

Versions: 5

Compression:

Stored size: 637 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe Botfly do
  describe ".logger" do
    subject { Botfly.logger }
    it { should be_a Logger }
  end

  describe ".login" do
    it "should connect before evaluation of block" do
      @bot = mock("bot") 
      Botfly::Bot.should_receive(:new).and_return(@bot)
      @bot.should_receive(:connect).ordered.once
      @bot.should_receive(:instance_exec).ordered.once
      Botfly.login('jid','pass')
    end
    it "should create a new bot" do
      stub_jabber_client
      bot = Botfly.login('jid','pass') { }
      bot.should be_a Botfly::Bot
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
botfly-0.3.6 spec/botfly_spec.rb
botfly-0.3.5 spec/botfly_spec.rb
botfly-0.3.4 spec/botfly_spec.rb
botfly-0.3.3 spec/botfly_spec.rb
botfly-0.3.2 spec/botfly_spec.rb