From dbd057a968c2d04d0119a1f1a5df9b5e5b934b76 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Fri, 19 Apr 2013 13:33:52 -0700 Subject: [PATCH] Simplify expression of the run with errors condition See https://github.com/wp-cli/wp-cli/pull/398/files#r3869578 --- features/steps/basic_steps.php | 7 ------- features/term.feature | 6 +----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/features/steps/basic_steps.php b/features/steps/basic_steps.php index 9de39f06..4e1d8c2b 100644 --- a/features/steps/basic_steps.php +++ b/features/steps/basic_steps.php @@ -142,13 +142,6 @@ $steps->Then( '/^it should run without errors$/', } ); -$steps->Then( '/^it should run with errors$/' , - function ( $world ) { - if ( empty( $world->result->STDERR ) ) - throw new \Exception( "No error produced" ); - } -); - $steps->Then( '/^(STDOUT|STDERR) should (be|contain|not contain):$/', function ( $world, $stream, $action, PyStringNode $expected ) { $output = $world->result->$stream; diff --git a/features/term.feature b/features/term.feature index 8c29b002..e8be1655 100644 --- a/features/term.feature +++ b/features/term.feature @@ -11,11 +11,7 @@ Feature: Manage WordPress terms """ When I run the previous command again - Then it should run with errors - And STDERR should be: - """ - Error: A term with the name provided already exists. - """ + Then STDERR should not be empty When I run `wp term list post_tag --format=json` Then it should run without errors -- 2.11.0