OSDN Git Service

Added CPT creation
authorjmslbam <jmslbam@gmail.com>
Thu, 9 May 2013 16:20:27 +0000 (18:20 +0200)
committerscribu <mail@scribu.net>
Fri, 10 May 2013 21:42:15 +0000 (00:42 +0300)
features/scaffold.feature

index 423d373..7f018db 100644 (file)
@@ -11,6 +11,17 @@ Feature: Wordpress code scaffolding
     And save STDOUT as {STYLESHEETPATH}
     And the {STYLESHEETPATH}/taxonomies/zombie-speed.php file should exist
 
+  Scenario: Scaffold a Custom Post Type and write it to active theme
+    Given a WP install
+
+    When I run `wp scaffold post-type zombie --theme`
+    Then it should run without errors
+
+    When I run `wp eval 'echo STYLESHEETPATH;'`
+    Then it should run without errors
+    And save STDOUT as {STYLESHEETPATH}
+    And the {STYLESHEETPATH}/post-types/zombie.php file should exist
+
   # Test for all flags but --label, --theme, --plugin and --raw
   Scenario: Scaffold a Custom Taxonomy and attach it to a CPT zombie that is prefixed and has a text domain
     Given a WP install
@@ -40,8 +51,6 @@ Feature: Wordpress code scaffolding
         __( 'Speed'
         """
 
-
-
   # Test for all flags but --label, --theme, --plugin and --raw
   Scenario: Scaffold a Custom Post Type
     Given a WP install