From 336c2cbb8f728825139f2ab94b96726935ea18a1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 7 Feb 2005 14:06:00 +0000 Subject: Added an Oracle adapter that works with the Oracle bindings by Yoshida (http://raa.ruby-lang.org/project/oracle/) #564 [Maik Schmidt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/finder_test.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'activerecord/test/finder_test.rb') diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 5944717132..1f6a58dee6 100755 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -34,10 +34,16 @@ class FinderTest < Test::Unit::TestCase end def test_find_all_with_prepared_limit_and_offset - entrants = Entrant.find_all nil, "id ASC", ["? OFFSET ?", 2, 1] - - assert_equal(2, entrants.size) - assert_equal(@entrants["second"]["name"], entrants.first.name) + if ActiveRecord::ConnectionAdapters.const_defined? :OracleAdapter + if ActiveRecord::Base.connection.instance_of?(ActiveRecord::ConnectionAdapters::OracleAdapter) + assert_raises(ArgumentError) { Entrant.find_all nil, "id ASC", ["? OFFSET ?", 2, 1] } + end + else + entrants = Entrant.find_all nil, "id ASC", ["? OFFSET ?", 2, 1] + + assert_equal(2, entrants.size) + assert_equal(@entrants["second"]["name"], entrants.first.name) + end end def test_find_with_entire_select_statement -- cgit v1.2.3