让rspec在RubyMine中工作



我刚刚安装了RubyMine,只要Ruby + gem + rspec + respect -rails。

我正在试着运行在http://rspec.info/上显示的迷你教程,但我有问题。

首先,我必须修改显示的
require 'bowling'

require_relative 'bowling'

当我得到一个

`require': no such file to load -- bowling.

现在,即使在这样做之后,我还是得到了一个

`<top (required)>': undefined method `describe' for main:Object (NoMethodError)

如何让rspec在RubyMine中工作?

RSpec .info为RSpec 1.x版本。文档2。如果您只执行gem install rspec,就可以在http://relishapp.com/rspec上找到它。你可能想看看他们的教程在那里。

我每天都使用RSpec和RubyMine,所以我认为版本不匹配是你最大的问题。

另外,如果你愿意购买一本书来学习RSpec,我强烈推荐http://pragprog.com/book/achbd/the-rspec-book from Pragmatic Programmers。

嗯,这似乎是一个已知的问题:

http://youtrack.jetbrains.net/issue/ruby - 8603 ?projectkey=ruby

编辑:它似乎确实有效。

最新更新