Sha256: 58f5fc4d5e79763ff7f567c336047218342a6d7616025e3d069cdab036bd8d0e

Contents?: true

Size: 725 Bytes

Versions: 1

Compression:

Stored size: 725 Bytes

Contents

require 'spec_helper'

describe Superfeedr::Client do
  it 'should it herited Blater::Client' do
    Superfeedr::Client.new.must_be_kind_of Blather::Client
  end

  describe '#initialize' do
    it 'should initialize deferred attribute like array' do
      client = Superfeedr::Client.new
      client.instance_variable_get(:@deferred).must_equal []
    end
  end

  describe '#subscribe' do
    it 'should write Subscribe' do
      client = Superfeedr::Client.setup 'login@superfeedr.com', 'pass'
      mock_stanza = mock()
      Blather::Stanza::PubSub::Subscribe.expects(:new).returns(mock_stanza)
      client.expects(:write).with(mock_stanza)
      client.subscribe('http://github.com/shingara.atom')
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
superfeedr-rb-0.2.0 spec/spec_superfeedr-rb_spec.rb