Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.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 3 遵循RoR3教程-测试不一致_Ruby On Rails 3 - Fatal编程技术网

Ruby on rails 3 遵循RoR3教程-测试不一致

Ruby on rails 3 遵循RoR3教程-测试不一致,ruby-on-rails-3,Ruby On Rails 3,我将学习RubyonRails3教程第6章。在我的目录spec/models/user_spec.rb中,我有6个测试用例(无需阅读它们): 在控制台中,我键入$rspec spec/models/user_spec.rb,它就会吐出来 No DRb server is running. Running in local process instead ... * Pending: User add some examples to (or delete) /Users/matthew/D

我将学习RubyonRails3教程第6章。在我的目录
spec/models/user_spec.rb
中,我有6个测试用例(无需阅读它们):

在控制台中,我键入
$rspec spec/models/user_spec.rb
,它就会吐出来

No DRb server is running. Running in local process instead ...
*

Pending:
  User add some examples to (or delete) /Users/matthew/Desktop/rails_projects/sample_app/spec/models/user_spec.rb
    # Not Yet Implemented
    # ./spec/models/user_spec.rb:4

Finished in 0.00023 seconds
1 example, 0 failures, 1 pending

最后一行说我只有一个示例和一个挂起,但我已经写了6个测试!这种前后不一致的情况让我感到不可思议!没有语法错误,我正在保存文件,我在正确的目录中,等等。

到目前为止最奇怪的事情(我使用的是Mac OS X和Textmate):

尽管代码、目录等正确,CMD+S或File->Save根本不保存文件。我一直在通过命令行打开文件。解决方法是关闭外壳并打开一个新的外壳

No DRb server is running. Running in local process instead ...
*

Pending:
  User add some examples to (or delete) /Users/matthew/Desktop/rails_projects/sample_app/spec/models/user_spec.rb
    # Not Yet Implemented
    # ./spec/models/user_spec.rb:4

Finished in 0.00023 seconds
1 example, 0 failures, 1 pending