Sha256: 7b507fad4c3c061c1b44b4958fe6ac0c134a83b7937f701a7632a2f92b5d5bad
Contents?: true
Size: 530 Bytes
Versions: 86
Compression:
Stored size: 530 Bytes
Contents
require 'rails_helper' describe LHS::Record do before(:each) 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
86 entries across 86 versions & 1 rubygems