Comments (9)
There's a load order issue at work here. Requiring Tempfile after FakeFS means Tempfile's extension to Dir gets loaded onto the Fake Dir, not RealDir. Deactivating FakeFS then breaks Tempfile completely. I don't know of a way around that except to make sure FakeFS gets loaded after Tempfile. The /tmp directory itself should simply be created by a test helper or something.
from fakefs.
Hello,
The problem here is not the load order, it happens that FakeFS::Dir.mkdir won't work properly when the path starts with a dot.
A fix for this and other issues, at my fork http://github.com/marano/fakefs .
Cheers.
from fakefs.
Can you point me to the commit which fixes this issue?
from fakefs.
Sure, this is the commit marano@bc9a3f7
Thanks.
from fakefs.
I am using @defunkt master branch. I am unable to create a Tempfile - No such file or directory - tmp
. Is there any new knowledge about a fix for this?
from fakefs.
I'm also seeing this issue (using rspec with rails). Changing the require order doesn't seem to help
from fakefs.
It seems that Dir._check_for_valid_file('tmp')
can't find the tmp dir in my rails install
from fakefs.
I've volunteered to update fakefs a little bit and triage the existing issues. Does anyone have a good reproducible test case for this? Please post a gist or something and I'll reopen.
from fakefs.
Awesome. Thanks for all of your hard work, Brian.
from fakefs.
Related Issues (20)
- make a 1.0.0 release? HOT 1
- please add ruby2.7 support HOT 3
- tests for the verbose option in cp and mv fail randomly under ruby 2.7 HOT 1
- Regression: FakeFS::File became non-IO HOT 2
- inconsitencies with some methods when passed an empty path HOT 1
- Dir.open() { |foo| ... } differs from standard Dir.open HOT 2
- Dir.glob fails if chdir to a directory that contains plus signs '+' HOT 4
- `File.readlines(path, chomp: true)` isn't supported (standard) HOT 1
- How do I simulate an ELOOP? HOT 4
- IO not mocked (specifically, IO.read not mocked) HOT 1
- How to use with byebug? HOT 2
- Mocking isolated directories HOT 1
- Pathname#glob HOT 3
- Using requests with fakefs HOT 2
- git head testsuite fails with ruby3.2dev for some unavailable method HOT 3
- File system and objects are not auto loaded on Ruby 3.0.4 HOT 5
- Can't use IRB when FakeFS is activated HOT 1
- Pathname's #realdirpath and #realpath do not work (as intended) HOT 1
- Ruby3 Kernel.open() handling of kwargs fails after fakefs deactivation HOT 3
- Calling FileUtils.touch on a symlink with a missing target throws an exception instead of creating the file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fakefs.