An error was introduced in commit 7061b06fd87dc8b952f9072507ee991ee0a0858e
where readline specs fail because require "readline" is called after the
spec has established a mock ::Readline. Prior to that change
require "readline" was always only called once.
This patch:
memoizes the require to ensure that it only happens once
leaves the Object.const_defined? check in place to keep tests simple
eagerly calls available? in the readline spec to match the original
author's intent by requiring readline before the specs start.
An error was introduced in commit 7061b06fd87dc8b952f9072507ee991ee0a0858e where readline specs fail because
require "readline"
is called after the spec has established a mock::Readline
. Prior to that changerequire "readline"
was always only called once.This patch:
require
to ensure that it only happens onceObject.const_defined?
check in place to keep tests simpleavailable?
in the readline spec to match the original author's intent by requiringreadline
before the specs start.This error wasn't caught by CI due to the bundler cache. You can see the failure caused by the earlier change by removing the Bundler cache from Travis