diff options
author | claudiob <claudiob@gmail.com> | 2014-12-08 13:02:29 -0800 |
---|---|---|
committer | claudiob <claudiob@gmail.com> | 2014-12-08 13:07:56 -0800 |
commit | 3502e6ed7c7a720e6b4d358d9ff7b3242e52a36f (patch) | |
tree | 3c158b3dfa5be2957043c687d9097d2e2b5ca74b /activerecord/test/cases | |
parent | 7daeb98c769a3968a2ccf48ff593909bf1a9d7b0 (diff) | |
download | rails-3502e6ed7c7a720e6b4d358d9ff7b3242e52a36f.tar.gz rails-3502e6ed7c7a720e6b4d358d9ff7b3242e52a36f.tar.bz2 rails-3502e6ed7c7a720e6b4d358d9ff7b3242e52a36f.zip |
Remove unused "Developer" fixtures from tests
The `RecursiveCallbackDeveloper` and `ImmutableMethodDeveloper` classes
are not used anymore in tests, and neither is the `@cancelled` variable.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/callbacks_test.rb | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/activerecord/test/cases/callbacks_test.rb b/activerecord/test/cases/callbacks_test.rb index e3c3c2fcdf..d4cc081f32 100644 --- a/activerecord/test/cases/callbacks_test.rb +++ b/activerecord/test/cases/callbacks_test.rb @@ -59,27 +59,6 @@ class ChildDeveloper < ParentDeveloper end -class RecursiveCallbackDeveloper < ActiveRecord::Base - self.table_name = 'developers' - - before_save :on_before_save - after_save :on_after_save - - attr_reader :on_before_save_called, :on_after_save_called - - def on_before_save - @on_before_save_called ||= 0 - @on_before_save_called += 1 - save unless @on_before_save_called > 1 - end - - def on_after_save - @on_after_save_called ||= 0 - @on_after_save_called += 1 - save unless @on_after_save_called > 1 - end -end - class ImmutableDeveloper < ActiveRecord::Base self.table_name = 'developers' @@ -88,37 +67,12 @@ class ImmutableDeveloper < ActiveRecord::Base before_save :cancel before_destroy :cancel - def cancelled? - @cancelled == true - end - private def cancel - @cancelled = true false end end -class ImmutableMethodDeveloper < ActiveRecord::Base - self.table_name = 'developers' - - validates_inclusion_of :salary, :in => 50000..200000 - - def cancelled? - @cancelled == true - end - - before_save do - @cancelled = true - false - end - - before_destroy do - @cancelled = true - false - end -end - class OnCallbacksDeveloper < ActiveRecord::Base self.table_name = 'developers' |