simonc / memfs

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

Support Dir.glob with Pathname. #21

Closed craigw closed 8 years ago

craigw commented 8 years ago

This works with stdlib:

require 'pathname'
p = Pathname.new('/')
Dir[p]
# => ["/"]

But before this change failed under MemFs:

TypeError:
  no implicit conversion of Pathname into String

This is more likely to be encountered in a Rails project where Rails.root is a Pathname, but it's very possible to encounter this in an Ruby project.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.0001%) to 99.83% when pulling 24c56a29e497864356fcab553da213616c70cff1 on barkingiguana:master into fc1353a519d0b980a429c2618bb2d61e9b999cb9 on simonc:master.

craigw commented 8 years ago

Hmm I don't think Travis is supporting Ruby older than 2.0.0 any more. It fails wit this message:

Gem::InstallError: ruby_dep requires Ruby version >= 2.0.0, ~> 2.0.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.0001%) to 99.83% when pulling b37cca20ff37f576a5d6da75e94be05d7565ce2c on barkingiguana:master into fc1353a519d0b980a429c2618bb2d61e9b999cb9 on simonc:master.

simonc commented 8 years ago

Hi @craigw. Thank you very much for your PR that's so cool! 😁