OSDN Git Service

add tests for `plugin status`
authorscribu <mail@scribu.net>
Fri, 8 Mar 2013 14:48:58 +0000 (16:48 +0200)
committerscribu <mail@scribu.net>
Fri, 8 Mar 2013 19:09:39 +0000 (21:09 +0200)
features/plugin.feature [new file with mode: 0644]

diff --git a/features/plugin.feature b/features/plugin.feature
new file mode 100644 (file)
index 0000000..0300fb2
--- /dev/null
@@ -0,0 +1,23 @@
+Feature: Manage WordPress plugins
+
+  Scenario: Checking the plugin status
+    Given WP install
+
+    When I run `wp plugin status`
+    Then it should run without errors
+    And STDOUT should not be empty
+
+    When I run `wp plugin status hello`
+    Then it should run without errors
+       And STDOUT should contain:
+         """
+         Plugin hello details:
+             Name: Hello Dolly
+         """
+
+    When I run `wp plugin status non-existent-plugin`
+    Then the return code should be 1
+       And STDERR should contain:
+         """
+         Error: The plugin 'non-existent-plugin' could not be found.
+         """