Skip to content
This repository
Browse code

test fixes for Oracle enhanced adapter:

latest oracle_enhanced adapter does automatic shortening of index names
ignore select from all_triggers table in assert_queries
  • Loading branch information...
commit 464b7f3ddcf5e9b23741862bf8c7a49f61792de3 1 parent 9bf7b63
Raimonds Simanovskis authored October 23, 2009
4  activerecord/test/cases/migration_test.rb
@@ -1374,8 +1374,8 @@ def test_create_table_with_custom_sequence_name
1374 1374
       return unless current_adapter? :OracleAdapter
1375 1375
 
1376 1376
       # table name is 29 chars, the standard sequence name will
1377  
-      # be 33 chars and fail
1378  
-      assert_raise(ActiveRecord::StatementInvalid) do
  1377
+      # be 33 chars and should be shortened
  1378
+      assert_nothing_raised do
1379 1379
         begin
1380 1380
           Person.connection.create_table :table_with_name_thats_just_ok do |t|
1381 1381
             t.column :foo, :string, :null => false
2  activerecord/test/connections/native_oracle/connection.rb
@@ -53,7 +53,7 @@
53 53
 
54 54
 # for assert_queries test helper
55 55
 ActiveRecord::Base.connection.class.class_eval do
56  
-  IGNORED_SELECT_SQL = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO SAVEPOINT/, /^RELEASE SAVEPOINT/, /^\s*select .* from all_tab_columns/im]
  56
+  IGNORED_SELECT_SQL = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO SAVEPOINT/, /^RELEASE SAVEPOINT/, /^\s*select .* from (all_tab_columns|all_triggers)/im]
57 57
 
58 58
   def select_with_query_record(sql, name = nil, return_column_names = false)
59 59
     $queries_executed ||= []

0 notes on commit 464b7f3

Please sign in to comment.
Something went wrong with that request. Please try again.