spork-testunit 没有测试运行

发布于 2024-12-15 01:47:32 字数 1055 浏览 2 评论 0原文

Ruby 新手,请耐心等待...我在 Windows 上使用 JRuby,spork-0.9.0.rc9。我可以很好地使用 rake 测试,但是当我尝试使用 testdrb 来使用 testunit 时,我的测试没有运行。例如:

testdrb -Itest test\functional\contents_controller_test.rb
Loaded suite contents_controller_test
Started

Finished in 0.113000 seconds.

0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
<-- Slave(2) run done!

而使用 rake 测试:

>rake test TEST=test\functional\contentscontroller_test.rb
c:/dev/apps/jruby-1.6.4/lib/ruby/gems/1.8/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53 warning: already initialized constant WFKV
Loaded suite c:/dev/apps/jruby-1.6.4/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader
Started

ContentsControllerTest:
PASS should create content (0.19s)
PASS should destroy content (0.03s)
PASS should get edit (0.29s)
PASS should get index (0.22s)
PASS should get new (0.06s)
PASS should show content (0.04s)
PASS should update content (0.05s)

Finished in 0.880000 seconds.

7 tests, 17 assertions, 0 failures, 0 errors, 0 skips

New to Ruby so please bear with me... I am using JRuby on Windows, spork-0.9.0.rc9. I am able to use rake test fine but when I try with testunit using testdrb my tests are not run. For example:

testdrb -Itest test\functional\contents_controller_test.rb
Loaded suite contents_controller_test
Started

Finished in 0.113000 seconds.

0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
<-- Slave(2) run done!

Whereas using rake test:

>rake test TEST=test\functional\contentscontroller_test.rb
c:/dev/apps/jruby-1.6.4/lib/ruby/gems/1.8/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53 warning: already initialized constant WFKV
Loaded suite c:/dev/apps/jruby-1.6.4/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader
Started

ContentsControllerTest:
PASS should create content (0.19s)
PASS should destroy content (0.03s)
PASS should get edit (0.29s)
PASS should get index (0.22s)
PASS should get new (0.06s)
PASS should show content (0.04s)
PASS should update content (0.05s)

Finished in 0.880000 seconds.

7 tests, 17 assertions, 0 failures, 0 errors, 0 skips

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文