NAME

Test::BDD::Infrastructure::Compare - cucumber step definitions for comparsion checks

VERSION

version 1.005

Description

This checks could be used to test configuration variables.

It could be used with a configuration backend like Augeas to check values in configuration files.

Synopsis

Load/register configurations in your step files:

  use File::Basename;
  use Test::BDD::Infrastructure::Config;
  use Test::BDD::Infrastructure::Config::Augeas;
  
  my $c = Test::BDD::Infrastructure::Config->new;
  $c->load_config( dirname(__FILE__)."/config.yaml" );
  $c->register_config(
          'a' => Test::BDD::Infrastructure::Config::Augeas->new,
  );

Also load the Compare step definitions:

  use Test::BDD::Infrastructure::Compare;

Then test your configuration:

  Scenario: Resolver must point local resolver
    Then the value $a:/files/etc/resolv.conf/nameserver must be the string 127.0.0.1

Step definitions

  Then the value <$var> must be like <regex>
  Then the value <$var> must be unlike <regex>
  Then the value <$var> must be <compare> <value>

AUTHOR

Markus Benning <ich@markusbenning.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Markus Benning.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.