2012-02-28 46 views
0

与ree-1.8.7-2011.03和rspec-1.3.2使用rvm,尝试运行Rails 2.3.14的spec文件时出错rspec-1.3.2失败,错误的参数数量与Rails 2.3.14

任何帮助表示赞赏,因为我无法运行任何规格测试。谢谢!

从我的Rails像文件夹中运行规范文件: 规格规格/型号/ assignment_spec.rb

〜/ .rvm /宝石/ REE-1.8.7-2011.03 /宝石/ rspec的-1.3.2/LIB /规格/流道/ options.rb:247:在`初始化':错误的参数数目(1 2)(引发ArgumentError)

from ~/.rvm/gems/ree-1.8.7-2011.03/gems/rspec-1.3.2/lib/spec/runner/options.rb:247:in `new' 
from ~/.rvm/gems/ree-1.8.7-2011.03/gems/rspec-1.3.2/lib/spec/runner/options.rb:247:in `load_formatters' 

...

〜/ .rvm /宝石/ ree-1.8.7-2011.03/gems/rspec-1.3.2/lib/spec/runner/.rb:

...

def load_formatters(format_options, formatters) 
    format_options.map do |format, where| 
     formatter_type = if formatters[format] 
     require formatters[format][0] 
     eval(formatters[format][1], binding, __FILE__, __LINE__) 
     else 
     load_class(format, 'formatter', '--format') 
     end 

     formatter_type.new(formatter_options) # <-- 247 
    end 
    end 

    def formatter_options 
    @formatter_options ||= OpenStruct.new(
     :colour => colour, 
     :autospec => autospec, 
     :dry_run => dry_run 
    ) 
    end 

...

编辑:

spec_helper.rb: https://github.com/instructure/canvas-lms/blob/stable/spec/spec_helper.rb

./.spec.opts:

--colour

- 需要spec/nested_in stafail_formatter

--format的RSpec :: NestedInstafailFormatter

--format HTML:TMP/spec_html/index.html的

+1

请显示您的spec_helper.rb – TheDelChop 2012-02-28 18:53:59

+0

您尝试过'ree-1.8.7-2012.02'吗? – mpapis 2012-02-28 19:05:18

+0

也请显示'。/ spec.opts'的内容 – zetetic 2012-02-28 19:43:39

回答

1

“?你​​尝试过用稀土元素,1.8.7-2012.02” - mpapis昨天

Mpapis回答了这个问题,规格测试运行使用ree-1.8.7-2012.02与rspec-1.3.2 ,.

相关问题