Remove references to jules git repo
[gitmo/Moose.git] / t / 500_test_moose / 005_with_immutable.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::Builder::Tester tests => 5;
7 use Test::More;
8
9 BEGIN {
10   use_ok('Test::Moose');
11 }
12
13 {
14     package Foo;
15     use Moose;
16 }
17
18 {
19     package Bar;
20     use Moose;
21 }
22
23 package main;
24
25 test_out("ok 1", "not ok 2");
26 test_fail(+2);
27 my $ret = with_immutable {
28     ok(Foo->meta->is_mutable);
29 } qw(Foo);
30 test_test('with_immutable failure');
31 ok(!$ret, "one of our tests failed");
32
33 test_out("ok 1", "ok 2");
34 $ret = with_immutable {
35     ok(Bar->meta->find_method_by_name('new'));
36 } qw(Bar);
37 test_test('with_immutable success');
38 ok($ret, "all tests succeeded");