Skip to content

Commit

Permalink
test fixes for Oracle enhanced adapter:
Browse files Browse the repository at this point in the history
latest oracle_enhanced adapter does automatic shortening of index names
ignore select from all_triggers table in assert_queries
  • Loading branch information
rsim committed Jun 4, 2010
1 parent 9bf7b63 commit 464b7f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions activerecord/test/cases/migration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/connections/native_oracle/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||= []
Expand Down

0 comments on commit 464b7f3

Please sign in to comment.