use Test::More;
use Scalar::Util 'blessed';
+# Don't spew deprecation warnings onto the user's screen
+BEGIN {
+ $SIG{__WARN__} = sub { warn $_[0] if $_[0] !~ /Squirrel is deprecated/ };
+}
+
do {
package Foo;
use Squirrel;
# affecting its definition
BEGIN {
- plan skip_all => "Moose required for this test" unless eval { require Moose };
+ plan skip_all => "Moose 0.68 required for this test" unless eval { require Moose && Moose->VERSION('0.68') };
plan tests => 12;
}
use Squirrel;
has bar => (is => 'rw');
+ __PACKAGE__->meta->make_immutable;
package Bar;
use Squirrel;
has bar => (is => 'rw');
+ __PACKAGE__->meta->make_immutable;
";
+warn $@ if $@;
is(blessed(Foo->meta->get_attribute('foo')), 'Mouse::Meta::Attribute');
is(blessed(Foo->meta->get_attribute('bar')), 'Mouse::Meta::Attribute', 'Squirrel is consistent if Moose was loaded between imports');