Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
define FakeFS::File.fnmatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Suraci authored and Alex Suraci & Ian Baker committed Mar 14, 2013
1 parent dae7642 commit 177a09f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 9 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -7,10 +7,19 @@
require "vmc/test_support"
require "webmock"
require "ostruct"
require "fakefs/safe"

INTEGRATE_WITH = ENV["INTEGRATE_WITH"] || "default"
TRAVIS_BUILD_ID = ENV["TRAVIS_BUILD_ID"]

OriginalFile = File

class FakeFS::File
def self.fnmatch(*args, &blk)
OriginalFile.fnmatch(*args, &blk)
end
end

def vmc_bin
vmc = File.expand_path("#{SPEC_ROOT}/../bin/vmc.dev")
if INTEGRATE_WITH != 'default'
Expand Down
5 changes: 0 additions & 5 deletions spec/vmc/cli/app/push/create_spec.rb
Expand Up @@ -76,8 +76,6 @@
FakeFS.activate!
Dir.mkdir(path)

# fakefs removes fnmatch :'(
stub(create.send(:detector)).detect_framework
File.open("#{path}/Procfile", "w") do |file|
file.write("this is a procfile")
end
Expand Down Expand Up @@ -152,9 +150,6 @@
before do
FakeFS.activate!
Dir.mkdir(path)

# fakefs removes fnmatch :'(
stub(create.send(:detector)).detect_framework
end

after do
Expand Down

0 comments on commit 177a09f

Please sign in to comment.