1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/test/test_activerecord_compat.rb

19 lines
475 B
Ruby
Raw Normal View History

require 'helper'
2010-08-16 20:44:48 -04:00
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'
manager.wheres.map { |x|
2010-08-16 20:44:48 -04:00
x.value
}.join(', ').must_equal "\"users\".\"id\" = 1, \"users\".\"name\" = 'Aaron'"
2010-08-16 20:44:48 -04:00
end
end
end
end