Permalink
Browse files

use seed repo for testing to get same results on different machines

  • Loading branch information...
1 parent 4c70dbb commit a73fff95fe270f83ca9879fbc501ace678e09d42 @dzaporozhets dzaporozhets committed Mar 28, 2013
Showing with 12 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. BIN repos/grit.tar.gz
  3. +11 −2 test/helper.rb
View
@@ -1,2 +1,3 @@
pkg
.DS_Store
+repos/grit/
View
Binary file not shown.
View
@@ -4,7 +4,16 @@
require 'test/unit'
require 'mocha/setup'
-GRIT_REPO = ENV["GRIT_REPO"] || File.expand_path(File.join(File.dirname(__FILE__), '..'))
+
+REPOS_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', 'repos'))
+GRIT_REPO = ENV["GRIT_REPO"] || File.join(REPOS_PATH, 'grit')
+
+if File.exists?(GRIT_REPO)
+ puts "Using repo from #{GRIT_REPO}"
+else
+ puts 'Unpacking repo for tests...'
+ puts `tar -C #{REPOS_PATH} -xvf #{GRIT_REPO}.tar.gz`
+end
include Grit
@@ -13,7 +22,7 @@ def fixture(name)
end
def absolute_project_path
- File.expand_path(File.join(File.dirname(__FILE__), '..'))
+ GRIT_REPO
end
def jruby?

0 comments on commit a73fff9

Please sign in to comment.