neilwatson has asked for the wisdom of the Perl Monks concerning the following question:

Greetings,

Does anyone have examples of Rex::Test::Spec to share? The documentation is slim. How does it know what host to test? How can I test multiple hosts with single test suite? My first try fails:

#!/usr/bin/env perl use strict; use warnings; use Rex::Test::Spec; describe "CFEngine tests", sub { context process( 'cf-exed' ), sub { like its( 'command' ), qr|\A(/var/cfengine/bin/)?cf-execd\Z|; }; }; done_testing; Run it: $ ./cfengine_test.pl Error loading Rex::Test::Spec::process. at /home/neil/perl5/perlbrew/p +erls/p

Neil Watson
watson-wilson.ca

Replies are listed 'Best First'.
Re: Using Rex::Test::Spec
by toolic (Bishop) on May 29, 2015 at 16:46 UTC
    Does anyone have examples of Rex::Test::Spec to share?
    I'll bet the module author has some; the person's email address is in the POD. The module was not shipped with any example code, and even the tests don't check anything meaningful. I don't see any code using Super Search, but the module was only released last year. You can always look at the source code to see what it is doing.