test/helper.rb in mercurial-ruby-0.3.0 vs test/helper.rb in mercurial-ruby-0.4.0

- old
+ new

@@ -14,15 +14,25 @@ require "minitest/autorun" $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) +$stderr.reopen('/dev/null') + require 'mercurial-ruby' require 'fixtures' -$stderr.reopen('/dev/null') +def erase_fixture_repository + `rm -Rf #{File.join(File.dirname(__FILE__), 'fixtures', 'test-repo')}` +end +def unpack_fixture_repository + `unzip #{File.join(File.dirname(__FILE__), 'fixtures', 'test-repo.zip')} -d #{File.join(File.dirname(__FILE__), 'fixtures')}` +end +erase_fixture_repository +unpack_fixture_repository + class MiniTest::Unit::TestCase include Mocha::API def setup Mocha::Mockery.instance.stubba.unstub_all @@ -35,7 +45,9 @@ f << Fixtures.hgrc_sample end end end + +MiniTest::Unit.after_tests { erase_fixture_repository } MiniTest::Unit.autorun \ No newline at end of file