Moving all the functional tests to the Rails 2 way, which uses less code by having an additional sub-class to take care of the duplicate code in every test. There is a bug in rails 2.0.2, which means that super doesn't get called in the setup method in the functional tests. This is fixed in Rails 2.1.2, thus a version bump should really be done.

This commit is contained in:
Shaun McDonald 2008-10-28 12:27:10 +00:00
parent e18c33f733
commit 427becc1db
12 changed files with 13 additions and 111 deletions

View file

@ -1,18 +1,9 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'old_node_controller'
# Re-raise errors caught by the controller.
class OldNodeController; def rescue_action(e) raise e end; end
class OldNodeControllerTest < Test::Unit::TestCase
class OldNodeControllerTest < ActionController::TestCase
api_fixtures
def setup
@controller = OldNodeController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
#
# TODO: test history
#