Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 自动测试:“自动测试”;无法运行测试;。但日志里什么都没有_Ruby On Rails_Rspec_Rspec2_Autotest_Zentest - Fatal编程技术网

Ruby on rails 自动测试:“自动测试”;无法运行测试;。但日志里什么都没有

Ruby on rails 自动测试:“自动测试”;无法运行测试;。但日志里什么都没有,ruby-on-rails,rspec,rspec2,autotest,zentest,Ruby On Rails,Rspec,Rspec2,Autotest,Zentest,自动测试因rspec rails 2.2.1更新而中断。现在我再也不能让它工作了。即使在回滚到rspec rais 2.2.0之后 我能找到的唯一信息是一个咆哮的弹出窗口,上面写着“应用程序:无法运行测试”。未将任何内容写入log/test.log 这是控制台中的输出: /Users/meltemi/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -I.:lib:test -rubygems -e "%w[test/unit test/test_helper.rb].eac

自动测试因rspec rails 2.2.1更新而中断。现在我再也不能让它工作了。即使在回滚到
rspec rais 2.2.0之后

我能找到的唯一信息是一个咆哮的弹出窗口,上面写着“应用程序:无法运行测试”。未将任何内容写入
log/test.log

这是控制台中的输出:

/Users/meltemi/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -I.:lib:test -rubygems -e "%w[test/unit test/test_helper.rb].each { |f| require f }" | unit_diff -u
Loaded suite -e
Started

Finished in 0.003428 seconds.


0 tests, 0 assertions, 0 failures, 0 errors, 0 skips

Test run options: --seed 38767
你知道从哪里开始解决这个问题吗?如果我能找到的话,我会在
自动测试日志中查找

编辑:尝试使用
自动测试-v
运行自动测试,并在控制台中获得一个长列表“没有匹配的测试…”(以下20±个示例):

以下是配置(
~/.autotest
):


autotest-s rspec2
告诉autotest使用“rspec2”样式,这将使它查找规范文件并运行其中的示例


不过,这只是一个解决办法。自动测试应该根据项目的
/Autotest/discover.rb
中的条目来发现规格。正如您所发现的,最近的代码更新破坏了自动发现。我自己也遇到了这个问题,无法找到问题的根源。

这行吗?:
自动测试-s rspec2
是!!!请把这个写进答案里,这样我就可以给你评分了。另外,如果可能的话,告诉我有什么不同,这样我就能理解为什么简单地键入
autotest
不再适用于我。。。我似乎找不到
自动测试的手册页。所以不知道
-s rspec2
做了什么。
...
No tests matched .git/objects/fe/41f5cc24d667635c46a533fd09bf7bb514e032
No tests matched .git/objects/fe/4577696b2811818fe7439990be0d2f65a892c5
No tests matched .git/objects/fe/e16b09c5e782035a347ed9b257ff9b2b3fa173
No tests matched .git/refs/heads/MenuModel
No tests matched .git/refs/heads/master
No tests matched .git/refs/remotes/origin/master
No tests matched .git/refs/tags/v0.0.1
No tests matched .git/refs/tags/v0.0.1.1
No tests matched .gitignore
No tests matched .rspec
No tests matched Capfile
No tests matched Gemfile
No tests matched Gemfile.lock
No tests matched README
No tests matched Rakefile
No tests matched app/helpers/application_helper.rb
No tests matched autotest/discover.rb
No tests matched config/application.rb
No tests matched config/boot.rb
No tests matched config/database.yml
No tests matched config/deploy.rb
No tests matched config/environment.rb
...
# ~/.autotest
# Include plugins
require 'autotest/fsevent'
require 'autotest/growl'

# ./.autotest
# exceptions (files to ignore) 
# mappings (which files to specifically monitor for changes)
Autotest.add_hook(:initialize) {|at|
  at.add_exception %r{^\.git}  # ignore Version Control System
  at.add_exception %r{^./tmp}  # ignore temp files, lest autotest will run again, and again...
  #  at.clear_mappings         # take out the default (test/test*rb)
  at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
    Dir['spec/**/*.rb']
  }
  nil
}