OSDN Git Service

merge theme install and delete scenarios; see #874
authorscribu <mail@scribu.net>
Sun, 17 Nov 2013 12:15:08 +0000 (14:15 +0200)
committerscribu <mail@scribu.net>
Sun, 17 Nov 2013 12:15:26 +0000 (14:15 +0200)
features/theme.feature

index 121c2c3..f14a820 100644 (file)
@@ -3,7 +3,7 @@ Feature: Manage WordPress themes
   Background:
     Given a WP install
 
-  Scenario: Installing a theme
+  Scenario: Installing and deleting theme
     When I run `wp theme install p2`
     Then STDOUT should not be empty
 
@@ -29,6 +29,13 @@ Feature: Manage WordPress themes
       Success: Switched to 'P2' theme.
       """
 
+    When I try `wp theme delete p2`
+    Then STDERR should be:
+      """
+      Warning: Can't delete the currently active theme: p2
+      """
+    And STDOUT should be empty
+
     When I run `wp theme activate {PREVIOUS_THEME}`
     Then STDOUT should not be empty
 
@@ -73,33 +80,3 @@ Feature: Manage WordPress themes
        """
        wp-content/themes/p2
        """
-
-  Scenario: Deleting a theme
-    When I run `wp theme install p2`
-    Then STDOUT should not be empty
-  
-    When I try `wp theme delete invalid-theme`
-    Then STDERR should contain:
-      """
-      Warning: The 'invalid-theme' theme could not be found.
-      """
-    And STDOUT should be empty
-
-    When I run `wp theme delete p2`
-    Then STDOUT should be:
-      """
-      Success: Deleted 'p2' theme.
-      """
-    And STDERR should be empty
-    
-    When I run `wp theme install p2 --activate`
-    Then STDOUT should not be empty
-    
-    When I try `wp theme delete p2`
-    Then STDERR should be:
-      """
-      Warning: Can't delete the currently active theme: p2
-      """
-    And STDOUT should be empty
-    
-    
\ No newline at end of file