Sha256: bde04b8784cb3fc2a033b0d51f2189b46ff2f62ef9424ba4e09aa9e2b2bfe86a
Contents?: true
Size: 796 Bytes
Versions: 4
Compression:
Stored size: 796 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') module WhosGotDirt::Responses::Entity RSpec.describe CorpWatch, vcr: {cassette_name: 'corp_watch_entity'} do let :response do Faraday.get("http://api.corpwatch.org/companies.json?company_name=bank&key=#{ENV['CORP_WATCH_API_KEY']}") end let :instance do CorpWatch.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 be > 3_000 end end describe '#index' do it 'should return the current index' do expect(instance.index).to eq(0) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems