Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Routine CPAN distribution.

Report information
The Basics
Id: 62469
Status: resolved
Priority: 0/
Queue: Test-Routine

People
Owner: Nobody in particular
Requestors: MJD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.003
Fixed in: (no value)



I named a test "new": test "new" => sub { ... } ; This produced an extremely unhelpful error message: Attribute (test_instance) does not pass the type constraint because: Validation failed for 'Test::Routine::Common' with value 1 at /usr/local/share/perl/5.10.1/Test/Routine/Runner.pm line 81 Test::Routine::Runner::run('Test::Routine::Runner=HASH(0xa1b1ab8 )') called at /usr/local/share/perl/5.10.1/Test/Routine/Util.pm line 70 Test::Routine::Util::run_tests('Test::Routine::Util', undef, 'main', undef) called at /usr/local/share/perl/5.10.1/Test/Routine/Util.pm line 48 Test::Routine::Util::run_me('Test::Routine::Util') called at /usr/local/share/perl/5.10.1/Test/Routine/Util.pm line 34 Test::Routine::Util::__ANON__() called at t/consumer/bytime/basic.t line 29 # Looks like your test exited with 255 just after 1. I don't demand that Test::Routine allow a test named "new", but I do think it should produce an externally intelligible error report.
Subject: "new" is a bad test name
now you get: can't name a test after a Moose::Object method (new) at /Users/rjbs/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/darwin-2level/Moose/Exporter.pm line 3 -- rjbs