Skip to content

Commit

Permalink
Rename L::Config::Static to L::Config::Attribute
Browse files Browse the repository at this point in the history
We can change the configuration, so Static doesn't sound right.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
  • Loading branch information
melo committed Aug 3, 2012
1 parent 4e39aad commit 4d32722
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Logan::Config::Static;
package Logan::Config::Attribute;

use Moo::Role;
use namespace::autoclean;
Expand Down
8 changes: 4 additions & 4 deletions t/40-config-static.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ use warnings;
use Test::More;
use Test::Deep;
use lib 't/tlib';
use T::Config::Static;
use T::Config::Attribute;

subtest 'access API' => sub {
my $l = T::Config::Static->setup;
my $l = T::Config::Attribute->setup;
cmp_deeply($l->config, {}, 'config() is empty by default');
is($l->config('boo'), undef, '... so asking for something that doesnt exist, returns undef');

$l = T::Config::Static->setup(config => { answer => 42 });
$l = T::Config::Attribute->setup(config => { answer => 42 });
cmp_deeply($l->config, { answer => 42 }, 'config() returns the full config now');
is($l->config('boo'), undef, '... but asking for something that doesnt exist, still undef');
is($l->config('answer'), 42, 'asking for something that is there returns the expected value');
};


subtest 'config updates' => sub {
my $l = T::Config::Static->setup;
my $l = T::Config::Attribute->setup;
cmp_deeply($l->config, {}, 'config() is empty by default');
is($l->update_called, 0, 'our update signal defaults to down');

Expand Down
2 changes: 1 addition & 1 deletion t/tlib/T/Base/Queued.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ package T::Base::Queued;

use Moo;
extends 'Logan';
with 'Logan::Config::Static', 'T::Dispatch::Queue';
with 'Logan::Config::Attribute', 'T::Dispatch::Queue';

1;
2 changes: 1 addition & 1 deletion t/tlib/T/Config/Static.pm → t/tlib/T/Config/Attribute.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package T::Config::Static;
package T::Config::Attribute;

use Moo;
extends 'T::Base::Queued';
Expand Down

0 comments on commit 4d32722

Please sign in to comment.