spec/query_spec.rb in rasti-db-0.2.4 vs spec/query_spec.rb in rasti-db-0.2.5
- old
+ new
@@ -38,9 +38,13 @@
it 'Map' do
users_query.map { |u| u.name }.must_equal db[:users].map(:name)
end
+ it 'Detect' do
+ users_query.detect(id: 3).must_equal User.new(id: 3, name: 'User 3')
+ end
+
it 'Where' do
users_query.where(id: 3).all.must_equal [User.new(id: 3, name: 'User 3')]
end
it 'Exclude' do
\ No newline at end of file