OSDN Git Service

Use the STDOUT saving technique so tests can pass.
authorDylan Kuhn <dylan.k.kuhn@gmail.com>
Tue, 28 May 2013 01:56:14 +0000 (18:56 -0700)
committerDylan Kuhn <dylan.k.kuhn@gmail.com>
Tue, 28 May 2013 01:57:27 +0000 (18:57 -0700)
The wp aliases in my PATH made me oblivious before...

features/search-replace.feature

index f18dd36..fa11307 100644 (file)
@@ -15,12 +15,31 @@ Feature: Do global search/replace
       guid
       """
 
-  Scenario: Large search/replace
+  Scenario: Small guid search/replace
     Given a WP install
 
+    When I run `wp option get siteurl`
+   
+    And save STDOUT as {SITEURL}
+
+    And I run `wp post generate --count=100`
+
+    And I run `wp search-replace {SITEURL} testreplacement`
+    Then STDOUT should be a table containing rows:
+    """
+    Table      Column  Replacements
+    wp_posts   guid    102
+    """
+  Scenario: Large guid search/replace
+    Given a WP install
+
+    When I run `wp option get siteurl`
+
+    And save STDOUT as {SITEURL}
+
     And I run `wp post generate --count=1200`
 
-    And I run `wp search-replace $( wp option get siteurl ) testreplacement`
+    And I run `wp search-replace {SITEURL} testreplacement`
     Then STDOUT should be a table containing rows:
     """
     Table      Column  Replacements