simonc / memfs

MemFs provides a fake file system that can be used for tests. Strongly inspired by FakeFS.
MIT License
322 stars 27 forks source link

MemFs::File undefined method `external_encoding' #12

Closed NotGrm closed 10 years ago

NotGrm commented 10 years ago

Just switching from FakeFs, to MemFs (you did a great job with this project), cause some I miss some FileUtils method, like remove_entry.

But I meet some problem for some specs which were green before. This failings tests use YAML::load method.

Here is my code :

File.open "data/#{@data}.yml" do |dumped_data|
  dump_data = YAML.load(dumped_data)
end

And my error message :

Failure/Error: dump_data = YAML.load(dumped_data)
NoMethodError:
   undefined method `external_encoding' for #<MemFs::File:0x007f25605599e8>

If it can help you those tests were successful with FakeFs

simonc commented 10 years ago

Hi @NotGrm ! Thanks for the feedback. I'll look into it asap. If I find a solution quickly, expect a release today ;)

simonc commented 10 years ago

Ok, I fixed the issue, File#external_encoding is just part of the File methods that I haven't yet implemented.

Since it's not a bug fix but a simple method addition, do you need an official release or will the updated master be enough? Just tell me and I'll publish if you need it ;)

NotGrm commented 10 years ago

I'm working on a minor project, no need to build gem and publish a new release. I will build it on my machine

Edit : All test pass :+1:

simonc commented 10 years ago

Awesome! Thanks :)