KelpX::Symbiosis::Test - Allow testing symbiotic environments using Kelp::Test
# in test file use KelpX::Symbiosis::Test; my $t = KelpX::Symbiosis::Test->wrap(app => $kelp_app); # continue testing using $t, just like Kelp::Test
This module allows testing Kelp apps with Symbiosis using Kelp::Test. The problem with Kelp::Test is that it automatically runs run() on the app without any way to configure this behavior. Symbiotic apps use run_all() to run the whole environment, while run() stays the same and only runs Kelp. This module replaces those two methods and autoloads the rest of the methods from Kelp instance.
new in 1.10
Instead of using Kelp::Test::new use KelpX::Symbiosis::Test::wrap with the same interface. Then you can create test cases not only for Kelp routes but also for the rest of Plack applications. The wrap method will return a Kelp::Test object, so refer to its documentation for more details.
The main Kelp instance is wrapped in this module class and the resulting object is passed into Kelp::Test instead. KelpX::Symbiosis::Test autoloads Kelp methods and wraps run_all inside run, which allows Kelp::Test to use it.
To install Kelp::Module::Symbiosis, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Kelp::Module::Symbiosis
CPAN shell
perl -MCPAN -e shell install Kelp::Module::Symbiosis
For more information on module installation, please visit the detailed CPAN module installation guide.