Error when running Unit::TestCase based tests #84

Closed
velovint opened this Issue Jan 18, 2010 · 1 comment

Comments

Projects
None yet
2 participants
@velovint
Member

velovint commented Jan 18, 2010

After upgrade to Rails 2.3 test cases fails with error

test/test_helper.rb:30: undefined method `use_transactional_fixtures=' for Test::Unit::TestCase:Class (NoMethodError)

solution to this problem is changing Test::Unit::TestCase with ActiveSupport::TestCase in test/test_helper.rb

diff --git a/lib/generators/extension/templates/test_helper.rb b/lib/generators/extension/templates/test_helper.rb
index 9d43ccd..6a2cffb 100644
index 9d43ccd..6a2cffb 100644
--- a/lib/generators/extension/templates/test_helper.rb
+++ b/lib/generators/extension/templates/test_helper.rb
@@ -13,7 +13,7 @@ unless defined? RADIANT_ROOT
end
require "#{RADIANT_ROOT}/test/test_helper"

-class Test::Unit::TestCase
+class ActiveSupport::TestCase

   # Include a helper to make testing Radius tags easier
   test_helper :extension_tags
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 2545a9c..8fb3545 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -14,7 +14,7 @@ unless defined? TEST_ROOT
   end
   require 'test_help'

-  class Test::Unit::TestCase
+  class ActiveSupport::TestCase
     # Transactional fixtures accelerate your tests by wrapping each test method
     # in a transaction that's rolled back on completion.  This ensures that the
     # test database remains unchanged so your fixtures don't have to be reloaded
@saturnflyer

This comment has been minimized.

Show comment Hide comment
@saturnflyer

saturnflyer Jan 25, 2010

Owner

use ActiveSupport::TestCase. Closed by 34e6268

Owner

saturnflyer commented Jan 25, 2010

use ActiveSupport::TestCase. Closed by 34e6268

rx pushed a commit to voomify/radiant that referenced this issue Jul 19, 2011

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment