【发布时间】:2011-03-05 17:05:00
【问题描述】:
我在使用 Test::Unit 2.0.6 通过自动测试运行 Rails 单元测试时遇到问题。通过rake test:units 运行测试效果很好,但是当我从 autotest 运行测试时,我得到了这个:
版本:
- Mac OS X 10.6.3
- ruby 1.8.7(2009-06-08 补丁级别 173)[universal-darwin10.0]
- Rails 2.3.5(基于 Suspenders)
- 自动测试 (4.3.2)
- 自动测试-fsevent (0.1.3)
- 自动测试咆哮 (0.1.7)
- 自动测试导轨 (4.1.0)
- ZenTest (4.3.3)
- 测试单元 (2.0.6)
测试单元 2.0.9 也会出现此问题。我已经尝试了Getting uninitialized constant error when trying to run tests 和http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/50 中的建议,但仍然没有运气。
如果我删除需要 Test::Unit 2.x 的断言并删除 test-unit gem,自动测试就可以正常工作。不幸的是,我需要使用 2.x 断言。
有什么想法吗?提前感谢您的任何帮助。
【问题讨论】:
标签: ruby-on-rails unit-testing autotest