Sha256: 82c9560e48287b2b16d3899390c319a568a51ee791c1ee6173a93198c605840e

Contents?: true

Size: 689 Bytes

Versions: 4

Compression:

Stored size: 689 Bytes

Contents

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

module WhosGotDirt::Responses::Entity
  RSpec.describe Poderopedia, vcr: {cassette_name: 'poderopedia_entity'} do
    let :response do
      Faraday.get("http://api.poderopedia.org/visualizacion/search?alias=juan&entity=persona&user_key=#{ENV['PODEROPEDIA_API_KEY']}")
    end

    let :instance do
      Poderopedia.new(response)
    end

    describe '#to_a' do
      it 'should return the results' do
        expect{instance.to_a}.to_not raise_error
      end
    end

    describe '#count' do
      it 'should return the number of results' do
        expect(instance.count).to eq(10)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
whos_got_dirt-0.0.5 spec/responses/entity/poderopedia_spec.rb
whos_got_dirt-0.0.4 spec/responses/entity/poderopedia_spec.rb
whos_got_dirt-0.0.3 spec/responses/entity/poderopedia_spec.rb
whos_got_dirt-0.0.2 spec/responses/entity/poderopedia_spec.rb