Sha256: 0d2034de33e5ec604fb35c39544d9a84954c8efcef859b5cafc735eaaf814be7

Contents?: true

Size: 820 Bytes

Versions: 7

Compression:

Stored size: 820 Bytes

Contents

require 'spec_helper'

describe Scouter::Buffer do
  describe '#get_count' do
    let!(:yahoo) { 'http://www.yahoo.co.jp/' }
    let!(:google) { 'http://www.google.com/' }

    context 'when url parameter is String' do
      context 'when url is feed url' do
        it 'return 129 shares' do
          results, errors = Scouter::Buffer.get_count(yahoo)
          expect(errors).to be_empty
          expect(results[yahoo].buffer).to be == 129
        end
      end
    end

    context 'when url parameter is Array' do
      it 'yahoo has over 129 shares and google 4635 shares' do
        results, errors = Scouter::Buffer.get_count([yahoo, google])
        expect(errors).to be_empty
        expect(results[yahoo].buffer).to be == 129
        expect(results[google].buffer).to be == 4635
      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scouter-0.0.7 spec/scouter/buffer_spec.rb
scouter-0.0.6 spec/scouter/buffer_spec.rb
scouter-0.0.5 spec/scouter/buffer_spec.rb
scouter-0.0.4 spec/scouter/buffer_spec.rb
scouter-0.0.3 spec/scouter/buffer_spec.rb
scouter-0.0.2 spec/scouter/buffer_spec.rb
scouter-0.0.1 spec/scouter/buffer_spec.rb