與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