`

restful_authentication 中 单元测试问题

阅读更多
The tests installed by restful_authentication encounter undefined-method errors, starting with "undefined method fixtures'" for the unit tests. The problem seems to be that the tests derive only from Test::Unit::TestCase, whereas the relevant methods are defined in ActiveRecord::TestCase and ActionController::TestCase for unit and functional tests, respectively.

My current work-around is to change the base class by hand, e.g. to replace

class UserTest < Test::Unit::TestCase

with

class UserTest < ActiveRecord::TestCase

This addresses the error, so that the tests at least can run.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics