Bug 15150: Make t/ tests skip if Test::DBIx::Class absent
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 6 Nov 2015 13:29:21 +0000 (10:29 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 6 Nov 2015 15:25:27 +0000 (12:25 -0300)
commit946cbf71a767c47d5cbed71f5ba1f4110476290a
treee876b9e178cae069d06b2e295003b15a003dacea
parent6c94dc79878c727b47f0617548613e1b7f5794a3
Bug 15150: Make t/ tests skip if Test::DBIx::Class absent

Tests in t/ should always pass for building the Debian packages
for Koha. But we've started using Test::DBIx::Class for writing
mocked tests, and that lib is not (yet) packaged fro Debian 7+.

This means build is failing. Devs and jenkins use the lib from CPAN.

This patch makes the tests skip if the lib is absent.

To test:
- Install Test::DBIx::Class
  $ sudo cpanm Test::DBIx::Class
- Run the tests:
  $ prove t/
=> SUCCESS: Tests pass
- Uninstall Test::DBIx::Class
  $ sudo cpan -U Test::DBIx::Class
- Run the tests:
  $ prove t/
=> SUCCESS: Tests still pass (those needing the lib are skipped)
- Sign off :-D

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. All test pass successful

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/Biblio.t
t/Calendar.t
t/Images.t
t/ItemType.t
t/Koha.t
t/Letters.t
t/Matcher.t
t/Members_AttributeTypes.t
t/SocialData.t