Sha256: 9f39f9ea5bbbffef9494afc392165602ee615280a74ac94c9f015aea5c195110
Contents?: true
Size: 600 Bytes
Versions: 5
Compression:
Stored size: 600 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' require 'lhs/rspec' describe LHS do before do class Record < LHS::Record endpoint 'https://records' end LHS.stub.all( 'https://records', 200.times.map { |index| { name: "Item #{index}" } }, headers: { 'Authorization' => 'Bearer 123' } ) end it 'stubs all requests' do records = Record.options(headers: { 'Authorization' => 'Bearer 123' }).all.fetch expect(records.count).to eq 200 expect(records.length).to eq 200 expect(records.first.name).to eq 'Item 0' end end
Version data entries
5 entries across 5 versions & 1 rubygems