Integrate fakefs-require's functionality #81

wants to merge 23 commits into from

5 participants


Just opening the Pull Request to keep everything in order. In the end there'll hopefully be one big merge commit. I did a subtree merge of my fakefs-require repo into vendor/fakefs-require/ and will move the code around during the next days/weeks.


@smtlaissezfaire Okay, I think I'm more or less done. If you're still open for merging this and don't have concerns about the code, the next thing to do will be editing the docs.

It would also make sense to activate FakeFS::Require when activating FakeFS, but that'd likely be a breaking change.

Edit: I'll be one holiday for the next week.


I rebased onto the current master and fixed two tests which didn't create a directory structure before creating files.


Rebased onto current master.


It would be great to get some feedback on this, otherwise I'll just move it back into my fakefs-require gem. Using Git sources with Bundler isn't a sustainable solution for me.

@smtlaissezfaire said a year ago that he'd consider merging it, and I also think it'd be a good feature addition and fix some confusing edge cases.


@lgierth I'm assuming this makes require use FakeFS?

If so, I'm all for it. Recently ran into it with my Sicuro gem, which uses FakeFS:

[nick@pi ~]$ irb -rsicuro
irb(main):001:0> Sicuro.eval("require 'dl'; require 'dl/import'; module Libc; extend DL::Importer; dlload '/lib/'; extern 'int kill(int, int)'; end; Libc.kill(0, 9)")
zsh: killed     irb -rsicuro
[nick@pi ~]$
@lgierth lgierth referenced this pull request in zipmark/rspec_api_documentation Aug 3, 2012

Don't load FakeFS for all specs #45


any updates on this?


@cutalion I abandoned hope, TBH.


I need to look at this patch more, but I'm getting the following test failures:

Sorry for the long lead time. I haven't been very involved in the ruby community as of late, and assume defunkt, et. all aren't very interested in this project any more.

I'm going to merge as many patches as I can in the next week and then give away the keys to the kingdom (open commit, Rubinus style) to anyone who wants it.


I've volunteered to update fakefs a little bit and triage the existing pull requests. I'm closing this one as it is quite old. If anyone wants to give it another go please open a new PR.

@lgierth lgierth referenced this pull request in simonc/memfs Jul 18, 2014

require/load/autoload #7

@bquorning bquorning referenced this pull request in bquorning/rubocop Apr 6, 2015
@bquorning bquorning tmp: use class_eval instead of require 7abf7c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment