From e1ebe6e949ef3674434bfa90d271a7b74c2ac153 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 18 Oct 2010 15:41:21 -0700 Subject: Fisting arel specs -- still needs tree_manager and cleanup --- test/test_activerecord_compat.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/test_activerecord_compat.rb (limited to 'test/test_activerecord_compat.rb') diff --git a/test/test_activerecord_compat.rb b/test/test_activerecord_compat.rb new file mode 100644 index 0000000000..2f1d7cff12 --- /dev/null +++ b/test/test_activerecord_compat.rb @@ -0,0 +1,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(', ').must_equal "\"users\".\"id\" = 1, \"users\".\"name\" = 'Aaron'" + end + end + end +end -- cgit v1.2.3