1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 USE_RUBY="ruby23 ruby24 ruby25 ruby26"
7 RUBY_FAKEGEM_TASK_DOC=""
8 RUBY_FAKEGEM_EXTRADOC="README.md"
10 RUBY_FAKEGEM_TASK_TEST="MOCHA_OPTIONS=use_test_unit_gem test:units test:acceptance"
12 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
16 DESCRIPTION="Extends mocha to allow tracking and querying of stub and mock invocations"
17 HOMEPAGE="https://github.com/thoughtbot/bourne"
21 KEYWORDS="~amd64 ~arm ~x86"
24 ruby_add_rdepend ">=dev-ruby/mocha-1.5.0:1.0"
26 ruby_add_bdepend "test? ( dev-ruby/test-unit:2 )"
29 sed -i -e '/git ls-files/d' "${RUBY_FAKEGEM_GEMSPEC}" || die
30 sed -i -e '/bundler/d' Rakefile || die
32 # Fix tests to work with mocha 1.5.0 or newer where reset_instance is gone
33 sed -i -e '/reset_instance/ s:^:#:' test/unit/*received_test.rb || die
34 sed -i -e 's/Mockery.reset_instance/mocha_teardown/' test/unit/mockery_test.rb || die