We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IRB can't start when FakeFS is activated, because it can't open the history file.
FakeFS
See the minimal example below:
require 'fakefs' RSpec.describe 'IRB inside FakeFS' do it 'works' do binding.irb end end
it ends up with an error:
Failure/Error: Unable to find pry-fakefs/irb_spec.rb to read failed line Errno::ENOENT: No such file or directory - /home/mrzasa/.irb-history # ruby-3.0.4/gems/fakefs-1.8.0/lib/fakefs/file.rb:876:in `check_file_existence!' # ruby-3.0.4/gems/fakefs-1.8.0/lib/fakefs/file.rb:503:in `initialize' # ruby-3.0.4/gems/fakefs-1.8.0/lib/fakefs/kernel.rb:40:in `open' # ruby-3.0.4/gems/fakefs-1.8.0/lib/fakefs/kernel.rb:40:in `block in <module:Kernel>' # pry-fakefs/irb_spec.rb:5:in `block (2 levels) in <top (required)>'
This I believe is an effect of hijacking the Kernel#open method. To fix it we need to unhijack it in the IRB context.
Kernel#open
Related to #290
Similar issue with pry is addressed in this PR: #485 (the pry problem is simpler though - it's enough to assign correctly mocked classes).
The text was updated successfully, but these errors were encountered:
PR welcome
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
IRB can't start when
FakeFS
is activated, because it can't open the history file.See the minimal example below:
it ends up with an error:
This I believe is an effect of hijacking the
Kernel#open
method. To fix it we need to unhijack it in the IRB context.Related to #290
Similar issue with pry is addressed in this PR: #485 (the pry problem is simpler though - it's enough to assign correctly mocked classes).
The text was updated successfully, but these errors were encountered: