Sha256: 97f31b7e83effdc74bb39a60823413582565d009d1e41990a374135735c2f244
Contents?: true
Size: 570 Bytes
Versions: 2
Compression:
Stored size: 570 Bytes
Contents
context 'Symbolic Operators' do specify('should use greater_than_or_equal_to to limit results') do Person.all(:age.gte => 28).size.should == 3 end specify('use an Array for in-clauses') do family = Person.all(:id => [1, 2, 4]) family[0].name.should == 'Sam' family[1].name.should == 'Amy' family[2].name.should == 'Josh' end specify('use "not" for not-equal operations') do Person.all(:name.not => 'Bob').size.should == 4 end specify('age should not be nil') do Person.all(:age.not => nil).size.should == 5 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datamapper-0.1.0 | spec/symbolic_operators.rb |
datamapper-0.1.1 | spec/symbolic_operators.rb |