与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的
请显示您的spec_helper.rb – TheDelChop 2012-02-28 18:53:59
您尝试过'ree-1.8.7-2012.02'吗? – mpapis 2012-02-28 19:05:18
也请显示'。/ spec.opts'的内容 – zetetic 2012-02-28 19:43:39