Sha256: 2cf14d1b6d5c9e93ace12f444ad5ae2e18f2001bd2c0a24bbbde73229a481706
Contents?: true
Size: 519 Bytes
Versions: 7
Compression:
Stored size: 519 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") .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
7 entries across 7 versions & 1 rubygems