Sha256: 1fd3ad99431177374ee7513ea4ca2f5a4c6f1f67adb3a285abd4449577d6a722
Contents?: true
Size: 693 Bytes
Versions: 6
Compression:
Stored size: 693 Bytes
Contents
require 'spec_helper' unless RUBY_PLATFORM == 'opal' # TODO: this should run fine under opal module Volt module Persistors describe Page do describe '#where' do it 'searches for records in the page collection with the given values' do juan = Volt::Model.new(name: 'Juan', city: 'Quito', age: 13) pedro = Volt::Model.new(name: 'Pedro', city: 'Quito', age: 15) jose = Volt::Model.new(name: 'Jose', city: 'Quito', age: 13) the_page._items = [jose, juan, pedro] expect(the_page._items.where(age: 13, city: 'Quito')).to match_array [juan, jose] end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems