Sha256: 1f223690b618034f6e09ded64b65b41e561e1f5b1bdd4306f795f2af52238697
Contents?: true
Size: 446 Bytes
Versions: 19
Compression:
Stored size: 446 Bytes
Contents
require 'rails_helper' describe LHS::Record do before do class Record < LHS::Record endpoint 'http://datastore/records' end end let(:item) { { name: 'Thomas' } } let(:body) { [item] } it 'converts itself to hash' do stub_request(:get, "http://datastore/records") .to_return(body: body.to_json) record = Record.where.first expect(record.to_h).to eq item expect(record.to_hash).to eq item end end
Version data entries
19 entries across 19 versions & 1 rubygems