pboyd / MooseX-Test-Role

Test functions for Moose roles
2 stars 5 forks source link

Support Moo::Roles in addition to Moose::Roles #1

Closed mjgardner closed 10 years ago

mjgardner commented 10 years ago

I'd like to test roles created with Moo::Role in addition to Moose::Role, since the former is supposed to be transparently usable and can transparently use Moose roles and classes. But consumer_of reports "first argument to consumer_of should be a role" when passing it the name of a Moo::Role, so it's back to creating anonymous Moose classes for now.

pboyd commented 10 years ago

This seems like it would be a good addition. I'll work on it.

pboyd commented 10 years ago

I was all set to add support for this, except it seemed to just work for me.

I was able to reproduce the issue you're seeing however, but only on Moo versions 1.000007 and below. Seems to work on version 1.000008 and above just fine though.

pboyd commented 10 years ago

I just uploaded a new version of MooseX::Test::Role with support for Role::Tiny roles, which should work for Moo::Roles prior to Moo version 1.000008 as well.