Reorganize t/020_attributes/
[gitmo/Mouse.git] / t / 020_attributes / 026_attribute_without_any_methods.t
CommitLineData
4060c871 1#!/usr/bin/perl
1f5ce14a 2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
5
4060c871 6use strict;
7use warnings;
8
1f5ce14a 9use Test::More;
4060c871 10
11use Mouse ();
12use Mouse::Meta::Class;
13
14my $meta = Mouse::Meta::Class->create('Banana');
15
16my $warn;
17$SIG{__WARN__} = sub { $warn = "@_" };
18
19$meta->add_attribute('foo');
20like $warn, qr/Attribute \(foo\) of class Banana has no associated methods/,
21 'correct error message';
22
23$warn = '';
24$meta->add_attribute('bar', is => 'bare');
25is $warn, '', 'add attribute with no methods and is => "bare"';
1f5ce14a 26
27done_testing;