且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

spork 0.9.2 和 rspec 3.0.0 = 未初始化的常量 RSpec::Core::CommandLine (NameError)

更新时间:2023-02-12 17:27:12

原因是RSpec3中去掉了RSpec::Core::CommandLine

The reason is that RSpec::Core::CommandLine was removed in Rspec3

https://github.com/rspec/rspec-core/blob/master/Changelog.md

将 RSpec::Core::CommandLine(从未正式声明为 public)合并到 RSpec::Core::Runner.(迈伦·马斯顿)

Merge RSpec::Core::CommandLine (never formally declared public) into RSpec::Core::Runner. (Myron Marston)

但是 spork 依赖于这个代码.

But spork depends on this code.

spork 的 github 上已经有问题,可以在以下 spork 的 fork 中找到解决方法:

There is already an issue on spork's github and a solution can be found in a following spork's fork:

https://github.com/codecarson/spork/commit/38c79dcedb246daacbadb9f18d09f50cc837de51#diff-937afaa19ccfee172d722a05112a7c6fL6一个>

一般-替换

::RSpec::Core::CommandLine.new(argv).run(stderr, stdout)

::RSpec::Core::Runner.run(argv,stderr, stdout)

在 soprks 源代码中

in the soprks source code