spork 0.9.2 and rspec 3.0.0 = uninitialized constant RSpec::Core::CommandLine (NameError)

前端 未结 5 1725
醉酒成梦
醉酒成梦 2020-12-29 05:11

Im using spork 0.9.2 and rspec 3.0.0. When trying to run test rspec --drb I have an exception

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems

5条回答
  •  独厮守ぢ
    2020-12-29 05:52

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

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

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

    But spork depends on this code.

    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

    In general - replace

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

    with

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

    in the soprks source code

提交回复
热议问题