Permalink
Browse files

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...
1 parent 9bf7b63 commit 464b7f3ddcf5e9b23741862bf8c7a49f61792de3 @rsim rsim committed Oct 23, 2009
@@ -1374,8 +1374,8 @@ def test_create_table_with_custom_sequence_name
return unless current_adapter? :OracleAdapter
# table name is 29 chars, the standard sequence name will
- # be 33 chars and fail
- assert_raise(ActiveRecord::StatementInvalid) do
+ # be 33 chars and should be shortened
+ assert_nothing_raised do
begin
Person.connection.create_table :table_with_name_thats_just_ok do |t|
t.column :foo, :string, :null => false
@@ -53,7 +53,7 @@
# for assert_queries test helper
ActiveRecord::Base.connection.class.class_eval do
- IGNORED_SELECT_SQL = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO SAVEPOINT/, /^RELEASE SAVEPOINT/, /^\s*select .* from all_tab_columns/im]
+ IGNORED_SELECT_SQL = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO SAVEPOINT/, /^RELEASE SAVEPOINT/, /^\s*select .* from (all_tab_columns|all_triggers)/im]
def select_with_query_record(sql, name = nil, return_column_names = false)
$queries_executed ||= []

0 comments on commit 464b7f3

Please sign in to comment.