blob: a7eeb7e5ee7e3f93c20c7df4fe246319271a61f6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
require 'spec_helper'
module Arel
describe 'activerecord compatibility' do
describe 'select manager' do
it 'provides wheres' do
table = Table.new :users
manager = Arel::SelectManager.new Table.engine
manager.where table[:id].eq 1
manager.where table[:name].eq 'Aaron'
check manager.wheres.map { |x|
x.value
}.join(', ').should == "\"users\".\"id\" = 1, \"users\".\"name\" = 'Aaron'"
end
end
end
end
|