rspec 3.0.1在测试用例中不起作用

时间:2014-06-15 23:37:46

标签: rspec

我有一个带有以下文件的〜/ Projects文件夹:

bowling.rb& bowling_spec.rb

这两个文件与rspec的索引页面(http://rspec.info/)中描述的文件相同,以便测试gem。

当我尝试执行bowling_spec.rb时,我收到以下消息:

ak@ak-ku:~/Projects$ rspec bowling_spec.rb 
/home/ak/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bowling (LoadError)
    from /home/ak/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/ak/Projects/bowling_spec.rb:1:in `<top (required)>'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in `load'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in `block in load_spec_files'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in `each'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in `load_spec_files'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:97:in `setup'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:85:in `run'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:70:in `run'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:38:in `invoke'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/gems/rspec-core-3.0.1/exe/rspec:4:in `<top (required)>'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/bin/rspec:23:in `load'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/bin/rspec:23:in `<main>'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/bin/ruby_executable_hooks:15:in `eval'
    from /home/ak/.rvm/gems/ruby-2.0.0-p481/bin/ruby_executable_hooks:15:in `<main>'

我该怎么办?为什么这不起作用?

我在Kubuntu的rvm 1.25.27下使用ruby 2.0.0p481。 Rails是4.1.1,我今天安装了所有东西。

0 个答案:

没有答案
相关问题