Sha256: 517762a92ac26673db1ba79d368146719b5344b7ba9b640fb079d935735802fe

Contents?: true

Size: 827 Bytes

Versions: 4

Compression:

Stored size: 827 Bytes

Contents

require 'spec_helper'
require 'rype'

describe Rype do
  describe '.instance' do
    subject { Rype.instance }
    it { should be_a(Rype::Api) }
  end

  describe '.attach' do
    it "should delegate to Rype::Api" do
      Rype::Api.should_receive(:attach).with("chat id")
      Rype.attach("chat id")
    end
  end

  describe '.chat' do
    subject { Rype.chat('chat id') }
    it { should be_a(Rype::Chat) }
  end

  describe '.chats' do
    it "should delegate to Rype::Chat" do
      Rype::Chat.should_receive(:all)
      Rype.chats
    end
  end

  describe '.on' do
    it "should delegate to Rype::Events" do
      Rype::Events.should_receive(:on)
      Rype.on
    end
  end

  describe '.thread' do
    it 'should delegate to Rype::Api' do
      Rype::Api.should_receive(:thread)
      Rype.thread
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rype-0.0.4 spec/lib/rype_spec.rb
rype-0.0.3 spec/lib/rype_spec.rb
rype-0.0.2 spec/lib/rype_spec.rb
rype-0.0.1 spec/lib/rype_spec.rb