Browse files

remove fakefs monkey patching

  • Loading branch information...
1 parent 3590a5c commit 8952c3aeba6c1e33b2771eda66a42d7e53dc63ff @marcisme committed Oct 7, 2013
Showing with 2 additions and 10 deletions.
  1. +2 −10 spec/spec_helper.rb
View
12 spec/spec_helper.rb
@@ -4,14 +4,6 @@
ENV['GUARD_ENV'] = 'test'
-# monkey patch for now
-FakeFS::FakeDir.class_eval do
-
- # we need to be able to set mtime for newest directory tests
- attr_accessor :mtime
-
-end
-
module FileHelpers
# convert the path to the fakefs path
@@ -25,8 +17,8 @@ def file(f)
end
def dir(d, mtime = nil)
- dir = FileUtils.mkpath(d)
- dir.mtime = Time.utc(mtime) if mtime
+ FileUtils.mkpath(d)
+ FileUtils.touch(Dir.glob(d), :mtime => Time.utc(mtime)) if mtime
end
end

0 comments on commit 8952c3a

Please sign in to comment.