From 721103efdae66a739ad16ac153a94c3a6d95ee42 Mon Sep 17 00:00:00 2001
From: Kieron Taylor <ktaylor@ebi.ac.uk>
Date: Tue, 30 Jul 2013 10:48:35 +0000
Subject: [PATCH] Updated to match new alt-allele error messages.

---
 modules/t/gene.t | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/t/gene.t b/modules/t/gene.t
index 7bd1ed0da7..010dc2fd18 100644
--- a/modules/t/gene.t
+++ b/modules/t/gene.t
@@ -3,7 +3,7 @@ use warnings;
 
 use Test::More;
 use Test::Exception;
-
+use Data::Dumper;
 use Bio::EnsEMBL::Registry;
 use Bio::EnsEMBL::Test::MultiTestDB;
 use Bio::EnsEMBL::Test::TestUtils;
@@ -512,7 +512,7 @@ $gene = $ga->fetch_by_dbID(18256);
 my $alt_genes = $gene->get_all_alt_alleles();
 
 ok($gene->is_reference == 1);
-
+#diag Dumper($alt_genes);
 ok(scalar(@$alt_genes) == 3);
 
 # expect the following alleles
@@ -522,7 +522,7 @@ for my $gene (@$alt_genes) {
   $ok = $ok && $gene_ids{$gene->dbID()};
   $ok = $ok && !($gene->is_reference);
 }
-ok($ok);
+ok($ok, "Retrieved alt alleles have correct dbIDs");
 
 #
 # test storing a new allele group
@@ -544,13 +544,13 @@ push(@alt_genes, $ga->fetch_by_dbID(18270));
 push(@alt_genes, $ga->fetch_by_dbID(18271));
 push(@alt_genes, $ga->fetch_by_dbID(18272));
 
-capture_std_streams(
+warns_like(
   sub {
-	my ($stdout_ref, $stderr_ref) = @_;
+#	my ($stdout_ref, $stderr_ref) = @_;
 	$ga->store_alt_alleles(\@alt_genes);
-	my $check = qr/.+ alternative .+ reference sequence .+ Ignoring/;
-	like(${$stderr_ref}, $check, 'Checking we are still warning about multiple alt_alleles on refs');
-  });
+#	my $check = qr/.+alternative.+reference\ssequence.+Ignoring/;
+#	like(${$stderr_ref}, $check, 'Checking we are still warning about multiple alt_alleles on refs');
+  }, qr/.+alternative.+reference\ssequence.+Ignoring/, 'Checking we are still warning about multiple alt_alleles on refs');
 $gene      = $ga->fetch_by_dbID(18270);
 $alt_genes = $gene->get_all_alt_alleles();
 %gene_ids  = (18271 => 1, 18272 => 1);
-- 
GitLab