diff options
Diffstat (limited to 'spec/arel/activerecord_compat_spec.rb')
-rw-r--r-- | spec/arel/activerecord_compat_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/arel/activerecord_compat_spec.rb b/spec/arel/activerecord_compat_spec.rb new file mode 100644 index 0000000000..a7eeb7e5ee --- /dev/null +++ b/spec/arel/activerecord_compat_spec.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(', ').should == "\"users\".\"id\" = 1, \"users\".\"name\" = 'Aaron'" + end + end + end +end |