You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added to locomotive/steam specs, into spec/unit/services/action_service_spec.rb, the following test. It's a copy of an existing spec named allEntries, but using the $or.
describe'allEntries with an $or'dolet(:now){Time.use_zone('America/Chicago'){Time.zone.local(2015,'mar',25,10,0)}}let(:assigns){{'now'=>now}}let(:script){<<-JS var entries = allEntries('bands', { '$or': [ { featured: true }, { leader: 'Eddie'} ] }); var names = [] for (var i = 0; i < entries.length; i++) { names.push(entries[i].name) } return names.join(', ') JS}beforedoexpect(entry_service).to(receive(:all).with('bands',{'$or'=>[{'featured'=>true},{'leader'=>'Eddie'}]},true).and_return([{'name'=>'Pearl Jam'},{'name'=>'The who'}]))endit{is_expected.toeq('Pearl Jam, The who')}end
This spec is passing, so I guess it used the mongoDB backend.
I dug more into steam, finding the lib/locomotive/steam/adapters/memory.rb.
I haven't found any trace of the $or in there.
I haven't been able to understand enough the spec/unit/adapters/memory_adapter_spec.rb and it's sub files to write a failing test for the or operator.
The text was updated successfully, but these errors were encountered:
In my wagon, in a
.liquid file
, I tried the following :I seams
$or
is not implemented.I added to
locomotive/steam
specs, intospec/unit/services/action_service_spec.rb
, the following test. It's a copy of an existing spec namedallEntries
, but using the$or
.This spec is passing, so I guess it used the mongoDB backend.
I dug more into steam, finding the
lib/locomotive/steam/adapters/memory.rb
.I haven't found any trace of the
$or
in there.I haven't been able to understand enough the
spec/unit/adapters/memory_adapter_spec.rb
and it's sub files to write a failing test for theor
operator.The text was updated successfully, but these errors were encountered: