Sha256: 9d58717afee804f68bd56a56c2c3af8a1ffaba193680fef373c90d8673083171

Contents?: true

Size: 781 Bytes

Versions: 1

Compression:

Stored size: 781 Bytes

Contents

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

module WhosGotDirt::Responses::List
  RSpec.describe LittleSis, vcr: {cassette_name: 'little_sis_list'} do
    let :response do
      Faraday.get("https://api.littlesis.org/lists.xml?q=united&_key=#{ENV['LITTLE_SIS_API_KEY']}")
    end

    let :instance do
      LittleSis.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 > 10
      end
    end

    describe '#page' do
      it 'should return the current page number' do
        expect(instance.page).to eq(1)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whos_got_dirt-0.0.2 spec/responses/list/little_sis_spec.rb