Closed mikz closed 9 years ago
Hi, thank you for the feedback. Are you using a specific version or master ?
I tried to reproduce the issue with a spec but the test passes :/
require 'spec_helper'
describe "Issue #15" do
it 'supports File.open then <<' do
expect{
MemFs.activate { File.open('file', 'w') { |f|f << 'test' } }
}.not_to raise_error
end
end
Ok, calling rake console
inside the gem I can reproduce the issue. I'll try to find where it comes from.
Found it. It was due to def fs
in _spechelper.rb that was making calls to fs
work during specs. I renamed it to _fs
to expose the false positive specs and it revealed the same issue in Dir
. Thank you very much!
try
MemFs.activate { File.open('file', 'w') { |f|f << 'test' } }
and seelooks like
fs
is on class, not an instance