diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-08-20 16:12:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-08-20 16:12:59 -0700 |
commit | e7ffa779322fcd864afe2b94c6fceaa3181535fb (patch) | |
tree | 4c61361922c28ff60a11ac199c5d27d0fa955ba2 /activerecord | |
parent | f734ec4807a52311e59df27dfc539fcb43f99f0e (diff) | |
download | rails-e7ffa779322fcd864afe2b94c6fceaa3181535fb.tar.gz rails-e7ffa779322fcd864afe2b94c6fceaa3181535fb.tar.bz2 rails-e7ffa779322fcd864afe2b94c6fceaa3181535fb.zip |
removing dead code
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/transactions_test.rb | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index 2f03db1f92..0d0de455b3 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -457,28 +457,16 @@ class TransactionTest < ActiveRecord::TestCase end private - def define_callback_method(callback_method) - define_method(callback_method) do - self.history << [callback_method, :method] - end - end - - %w(validation save destroy).each do |filter| - define_method("add_cancelling_before_#{filter}_with_db_side_effect_to_topic") do |topic| - meta = class << topic; self; end - meta.send("define_method", "before_#{filter}_for_transaction") do - Book.create - false - end - end - define_method("remove_cancelling_before_#{filter}_with_db_side_effect_to_topic") do - Topic.class_eval <<-eoruby, __FILE__, __LINE__ + 1 - remove_method :before_#{filter}_for_transaction - def before_#{filter}_for_transaction; end - eoruby + %w(validation save destroy).each do |filter| + define_method("add_cancelling_before_#{filter}_with_db_side_effect_to_topic") do |topic| + meta = class << topic; self; end + meta.send("define_method", "before_#{filter}_for_transaction") do + Book.create + false end end + end end class TransactionsWithTransactionalFixturesTest < ActiveRecord::TestCase |