Sha256: f779b53bcbfa95a4ae2a00363dbaab40df4103092af13bf979d60a735379182d

Contents?: true

Size: 1.09 KB

Versions: 12

Compression:

Stored size: 1.09 KB

Contents

require 'rubygems'
require 'bundler'
require 'ruby-debug'

begin
  Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
  $stderr.puts e.message
  $stderr.puts "Run `bundle install` to install missing gems"
  exit e.status_code
end

require "mocha"
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'

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
  end
  
private

  def stub_hgrc(path)
    File.open(path, 'w') do |f|
      f << Fixtures.hgrc_sample
    end
  end
  
end

MiniTest::Unit.after_tests { erase_fixture_repository }

MiniTest::Unit.autorun

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mercurial-ruby-0.7.7 test/helper.rb
mercurial-ruby-0.7.6 test/helper.rb
mercurial-ruby-0.7.5 test/helper.rb
mercurial-ruby-0.7.4 test/helper.rb
mercurial-ruby-0.7.3 test/helper.rb
mercurial-ruby-0.7.2 test/helper.rb
mercurial-ruby-0.7.1 test/helper.rb
mercurial-ruby-0.7.0 test/helper.rb
mercurial-ruby-0.6.1 test/helper.rb
mercurial-ruby-0.6.0 test/helper.rb
mercurial-ruby-0.5.0 test/helper.rb
mercurial-ruby-0.4.0 test/helper.rb