Browse files

Few more warnings removed.

I found them when I was running
warning mode on with railties

See #3782
  • Loading branch information...
1 parent 60c88e6 commit ff04bb84e186c10cebdc74d19d6a691e9d11f4a7 @arunagw arunagw committed Sep 15, 2012
View
2 activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -176,7 +176,7 @@ def within_new_transaction(options = {}) #:nodoc:
ensure
begin
commit_transaction unless error
- rescue Exception => e
+ rescue Exception
rollback_transaction
raise
end
View
6 railties/test/application/rake/dbs_test.rb
@@ -100,7 +100,7 @@ def db_fixtures_load
`rails generate model book title:string`
`bundle exec rake db:migrate`
`bundle exec rake db:fixtures:load`
- assert_match /#{expected[:database]}/,
+ assert_match(/#{expected[:database]}/),
ActiveRecord::Base.connection_config[:database]
require "#{app_path}/app/models/book"
assert_equal 2, Book.count
@@ -129,7 +129,7 @@ def db_structure_dump_and_load
assert_match(/CREATE TABLE \"books\"/, structure_dump)
`bundle exec rake db:drop`
`bundle exec rake db:structure:load`
- assert_match /#{expected[:database]}/,
+ assert_match(/#{expected[:database]}/),
ActiveRecord::Base.connection_config[:database]
require "#{app_path}/app/models/book"
#if structure is not loaded correctly, exception would be raised
@@ -161,7 +161,7 @@ def db_test_load_structure
require "#{app_path}/app/models/book"
#if structure is not loaded correctly, exception would be raised
assert Book.count, 0
- assert_match /#{ActiveRecord::Base.configurations['test']['database']}/,
+ assert_match(/#{ActiveRecord::Base.configurations['test']['database']}/),
ActiveRecord::Base.connection_config[:database]
end
end

0 comments on commit ff04bb8

Please sign in to comment.