Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Get around FakeFS bug (defunkt/fakefs#177)

By stubbing the #cp call so that it will create the necessary
FS entry.
  • Loading branch information...
commit 8cd02af0fc65942f6fba0be545ef53093c2a7787 1 parent dc233be
@BanzaiMan BanzaiMan authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 spec/rhc/commands/git_clone_spec.rb
View
8 spec/rhc/commands/git_clone_spec.rb
@@ -56,6 +56,14 @@
say "Copied" if File.exists?("#{repo_dir}/.git/hooks/pre_commit")
true
end
+
+ # Get around the FakeFS bug (defunkt/fakefs#177) by
+ # stubbing the #cp call to inject a expected fs entry
+ FileUtils.stub(:cp) do |hook, dir|
+ FakeFS::FileSystem.add(
+ File.join(dir, File.basename(hook)),
+ FakeFS::FileSystem.find(hook))
+ end
end
it { expect { run }.should exit_with_code(0) }
it { run_output.should match("Copied") }
Please sign in to comment.
Something went wrong with that request. Please try again.