| 1 | package Test::BDD::Cucumber::Definitions::Base::In; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use utf8; | ||
| 6 | |||
| 7 | use Test::BDD::Cucumber::Definitions qw(C Given When Then); | ||
| 8 | use Test::BDD::Cucumber::Definitions::Base qw(Base); | ||
| 9 | |||
| 10 | our $VERSION = '0.41'; | ||
| 11 | |||
| 12 | ## no critic [RegularExpressions::ProhibitCaptureWithoutTest] | ||
| 13 | ## no critic [RegularExpressions::RequireExtendedFormatting] | ||
| 14 | ## no critic [RegularExpressions::ProhibitComplexRegexes] | ||
| 15 | |||
| 16 | sub import { | ||
| 17 | |||
| 18 | # base param "(.+?)" set "(.*)" | ||
| 19 | Given qr/base param "(.+?)" set "(.*)"/, sub { | ||
| 20 | Base->param_set( $1, $2 ); | ||
| 21 | }; | ||
| 22 | |||
| 23 | # base request send "(.+?)" | ||
| 24 | When qr/base request send "(.+?)"/, sub { | ||
| 25 | Base->request_send($1); | ||
| 26 | }; | ||
| 27 | |||
| 28 | # base request send | ||
| 29 | When qr/base request send/, sub { | ||
| 30 | Base->request_send( C->data() ); | ||
| 31 | }; | ||
| 32 | |||
| 33 | return; | ||
| 34 | } | ||
| 35 | |||
| 36 | 1; |