Skip to content

Commit

Permalink
Fix obscure change to Dir.entries in Ruby 2.1.0-preview2
Browse files Browse the repository at this point in the history
References #114
  • Loading branch information
benjaminoakes committed Dec 5, 2013
1 parent fc7dbeb commit 54c94f5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/lib/maid/tools_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# encoding: utf-8
require 'spec_helper'

# Workaround for Ruby 2.1.0
if RUBY_VERSION == '2.1.0'
module FakeFS
class Dir
def self.entries(dirname, opts = {})
_check_for_valid_file(dirname)

Dir.new(dirname).map { |file| File.basename(file) }
end
end
end
end

module Maid
# NOTE: Please use FakeFS instead of mocking and stubbing specific calls which happen to modify the filesystem.
#
Expand Down

0 comments on commit 54c94f5

Please sign in to comment.