diff options
author | 2010-01-15 00:39:55 +0000 | |
---|---|---|
committer | 2010-01-15 00:39:55 +0000 | |
commit | a3b80a8242aefafa5ccb99bfe5c2ad28f34c86bc (patch) | |
tree | 72098b3219e04f2c803d708639f2447e1c50a816 /dev-ruby | |
parent | Version bump. Fix doc building, install in same doc directory, bug #293668. (diff) | |
download | gentoo-2-a3b80a8242aefafa5ccb99bfe5c2ad28f34c86bc.tar.gz gentoo-2-a3b80a8242aefafa5ccb99bfe5c2ad28f34c86bc.tar.bz2 gentoo-2-a3b80a8242aefafa5ccb99bfe5c2ad28f34c86bc.zip |
Actually run tests, at least for MRI 1.8 and 1.9, now that webmock works. JRuby is still missing, and nokogiri tests need to be checked for good.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/rspec/ChangeLog | 6 | ||||
-rw-r--r-- | dev-ruby/rspec/rspec-1.3.0.ebuild | 54 |
2 files changed, 42 insertions, 18 deletions
diff --git a/dev-ruby/rspec/ChangeLog b/dev-ruby/rspec/ChangeLog index 61250d11b0a2..198750b259dc 100644 --- a/dev-ruby/rspec/ChangeLog +++ b/dev-ruby/rspec/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-ruby/rspec # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rspec/ChangeLog,v 1.59 2010/01/14 16:22:24 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rspec/ChangeLog,v 1.60 2010/01/15 00:39:55 flameeyes Exp $ + + 15 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org> rspec-1.3.0.ebuild: + Actually run tests, at least for MRI 1.8 and 1.9, now that webmock works. + JRuby is still missing, and nokogiri tests need to be checked for good. 14 Jan 2010; Brent Baude <ranger@gentoo.org> rspec-1.3.0.ebuild: Marking rspec-1.3.0 ~ppc for bug 300739 diff --git a/dev-ruby/rspec/rspec-1.3.0.ebuild b/dev-ruby/rspec/rspec-1.3.0.ebuild index 2e17b8e40cf7..819144b84d75 100644 --- a/dev-ruby/rspec/rspec-1.3.0.ebuild +++ b/dev-ruby/rspec/rspec-1.3.0.ebuild @@ -1,10 +1,12 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rspec/rspec-1.3.0.ebuild,v 1.3 2010/01/14 16:22:24 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rspec/rspec-1.3.0.ebuild,v 1.4 2010/01/15 00:39:55 flameeyes Exp $ EAPI=2 USE_RUBY="ruby18 ruby19 jruby" +RUBY_FAKEGEM_TASK_TEST="spec" + RUBY_FAKEGEM_TASK_DOC="docs" RUBY_FAKEGEM_DOCDIR="doc" RUBY_FAKEGEM_EXTRADOC="History.rdoc README.rdoc TODO.txt Ruby1.9.rdoc Upgrade.rdoc" @@ -21,22 +23,40 @@ IUSE="" ruby_add_bdepend doc dev-ruby/hoe -# Only require the test packages for ruby18 as we _really_ won't be -# running tests for Ruby 1.9 and JRuby just yet :( -USE_RUBY=ruby18 \ - ruby_add_bdepend test "dev-ruby/hoe dev-ruby/zentest dev-ruby/heckle dev-ruby/fakefs" +# don't require test dependencies for jruby since we cannot run them +# for now (fakefs doesn't work). +# +# We should add nokogiri here to make sure that we test as much as +# possible, but since it's yet unported to 1.9 and the nokogiri-due +# tests fail for sure, we'll be waiting on it. +USE_RUBY="ruby18 ruby19" \ + ruby_add_bdepend test "dev-ruby/hoe dev-ruby/zentest dev-ruby/fakefs" + +# the testsuite skips over heckle for Ruby 1.9 so we only request it for 1.8 +USE_RUBY="ruby18" \ + ruby_add_bdepend test "dev-ruby/heckle" + +all_ruby_prepare() { + # Replace reference to /tmp to our temporary directory to avoid + # sandbox-related failure. + sed -i \ + -e "s:/tmp:${T}:" \ + spec/spec/runner/command_line_spec.rb || die +} + +src_test() { + chmod 0755 ${WORKDIR/work/homedir} || die "Failed to fix permissions on home" + ruby-ng_src_test +} each_ruby_test() { - if [[ $(basename ${RUBY}) == "ruby19" ]]; then - ewarn "Tests for Ruby 1.9 fail, among the other reasons because interop only works" - ewarn "for test-unit-1.2.3 (and not test-unit-2.x). Since we know about those failures" - ewarn "as well as upstream, we won't be proceeding with this for now." - return 0 - fi - - if [[ $(basename ${RUBY}) == "jruby" ]]; then - ewarn "Tests for JRuby are disabled because dev-ruby/fakefs does not currently support" - ewarn "JRuby properly and it's needed to run the tests." - return 0 - fi + case ${RUBY} in + *jruby) + ewarn "Tests for JRuby are disabled because dev-ruby/fakefs does not currently support" + ewarn "JRuby properly and it's needed to run the tests." + ;; + *) + each_fakegem_test + ;; + esac } |