Browse files

Moved ParanoidBaseTest to test_helper for easier inclusion in multipl…

…e test files
  • Loading branch information...
1 parent bb970fc commit 2c8768ee478c4c4d38e3a9e16128efc9ed5e4876 @softcraft-development softcraft-development committed Dec 6, 2011
Showing with 26 additions and 25 deletions.
  1. +0 −25 test/rails3_acts_as_paranoid_test.rb
  2. +26 −0 test/test_helper.rb
View
25 test/rails3_acts_as_paranoid_test.rb
@@ -1,30 +1,5 @@
require 'test_helper'
-class ParanoidBaseTest < ActiveSupport::TestCase
- def assert_empty(collection)
- assert(collection.respond_to?(:empty?) && collection.empty?)
- end
-
- def setup
- setup_db
-
- ["paranoid", "really paranoid", "extremely paranoid"].each do |name|
- ParanoidTime.create! :name => name
- ParanoidBoolean.create! :name => name
- end
-
- ParanoidString.create! :name => "strings can be paranoid"
- NotParanoid.create! :name => "no paranoid goals"
- ParanoidWithCallback.create! :name => "paranoid with callbacks"
-
- ParanoidObserver.instance.reset
- end
-
- def teardown
- teardown_db
- end
-end
-
class ParanoidTest < ParanoidBaseTest
def test_fake_removal
assert_equal 3, ParanoidTime.count
View
26 test/test_helper.rb
@@ -270,3 +270,29 @@ def reset
end
ParanoidWithCallback.add_observer(ParanoidObserver.instance)
+
+
+class ParanoidBaseTest < ActiveSupport::TestCase
+ def assert_empty(collection)
+ assert(collection.respond_to?(:empty?) && collection.empty?)
+ end
+
+ def setup
+ setup_db
+
+ ["paranoid", "really paranoid", "extremely paranoid"].each do |name|
+ ParanoidTime.create! :name => name
+ ParanoidBoolean.create! :name => name
+ end
+
+ ParanoidString.create! :name => "strings can be paranoid"
+ NotParanoid.create! :name => "no paranoid goals"
+ ParanoidWithCallback.create! :name => "paranoid with callbacks"
+
+ ParanoidObserver.instance.reset
+ end
+
+ def teardown
+ teardown_db
+ end
+end

0 comments on commit 2c8768e

Please sign in to comment.