summaryrefslogtreecommitdiff
blob: 258c0856f02e91371cf153843a831e1e3fedc3fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-unit/test-unit-2.0.3.ebuild,v 1.1 2009/07/19 08:55:07 flameeyes Exp $

inherit ruby

DESCRIPTION="An improved version of the Test::Unit framework from Ruby 1.8"
HOMEPAGE="http://test-unit.rubyforge.org/"
SRC_URI="mirror://rubyforge/${PN}/${P}.tgz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~x86-fbsd"
IUSE="doc"

DEPEND="
	doc? ( dev-ruby/rake
		dev-ruby/hoe )"
#	test? ( dev-ruby/rake
#		dev-ruby/hoe
#		dev-ruby/zentest )"
RDEPEND=""

USE_RUBY="ruby18 ruby19"

src_compile() {
	if use doc; then
		rake doc || die "rake doc failed"
	fi
}

src_test() {
	for ruby in $USE_RUBY; do
		[[ -n `type -p $ruby` ]] || continue
		# the rake audit using dev-ruby/zentest currently fails, and we
		# just need to call the testsuite directly.
		# rake audit || die "rake audit failed"
		$ruby test/run-test.rb || die "testsuite failed"
	done
}

src_install() {
	cd "${S}"/lib
	doruby -r * || die "doruby failed"

	if use doc; then
		dohtml -r "${S}"/doc/* || die "dohtml failed"
	fi

	dodoc "${S}"/{TODO,README.txt,History.txt} || die "dodoc failed"
}