Sha256: 5f37f3b64d04fe6e0a041ccc89c2777cf5555af683ef39d580d4b5681bfcbe7b
Contents?: true
Size: 594 Bytes
Versions: 2
Compression:
Stored size: 594 Bytes
Contents
require 'spec_helper' describe 'Ensure that we don\'t stomp on Active Record\'s queries' do let!(:adapter) { ActiveRecord::Base.connection } before do adapter.create_table :sanity_tests, :force => true do |t| t.string :tags, :array => true t.integer :tag_ids, :array => true end class SanityTest < ActiveRecord::Base attr_accessible :tags, :tags_ids end end describe '.where' do it 'generates IN clauses for non array columns' do query = SanityTest.where(:id => [1,2,3]).to_sql query.should match /IN \(1, 2, 3\)/ end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
postgres_ext-0.2.1 | spec/queries/sanity_spec.rb |
postgres_ext-0.2.0 | spec/queries/sanity_spec.rb |