Sha256: c5e9790b3988959df1ff9efc6e98adebe3c2a99678c0b0a4ae30933dbcfa4aec
Contents?: true
Size: 523 Bytes
Versions: 19
Compression:
Stored size: 523 Bytes
Contents
require 'rails_helper' describe LHS::Record do before do class Record < LHS::Record endpoint 'http://datastore/records/' end stub_request(:get, "http://datastore/records/?limit=1&name=Steve&color=blue") .to_return(body: [{ name: 'Steve', color: 'blue' }].to_json) end it 'allows chaining find_by' do Record.options(params: { color: 'blue' }).find_by(name: 'Steve') end it 'allows chaining find_by!' do Record.options(params: { color: 'blue' }).find_by!(name: 'Steve') end end
Version data entries
19 entries across 19 versions & 1 rubygems