RSpec,加载助手时没有要加载的文件
我有一个使用 RSpec2 beta 19 的 Sinatra 应用程序。我的 application.rb 和 app_helpers.rb 位于目录 /lib 中。应用程序显然加载了帮助程序模块并且我的应用程序运行,但是当我运行 RSpec 时,我收到一条错误,指出它无法找到帮助程序模块中所需的任何 gem。我现在确定如何加载 application.rb 而不会出现错误。
I have a Sinatra app that uses RSpec2 beta 19. My application.rb and app_helpers.rb are in a directory /lib. The application obviously loads the helper module and my application runs but when I run RSpec I get an error that it is unable to located any gems required in the helper module. I am now sure how to load the application.rb without getting errors.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我听说,您可以尝试升级到 rspec-2.0.0.rc,最终版本应该在一周内可用。
You might try upgrading to rspec-2.0.0.rc, and the final version should be available within a week, so I've heard.
我发现我有多个版本的 rspec。我删除了它们并使用了 beta.22,它现在似乎可以工作了。
I found that I had multiple versions of rspec. I removed them and went with beta.22 and it seems to be working now.