<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -19,11 +19,11 @@ module Spec
       end
 
       def matches?(name)
-        !(matches = name.match(@expression)).nil?
+        !(name.strip =~ @expression).nil?
       end
             
       def parse_args(name)
-        name.match(@expression)[1..-1]
+        name.strip.match(@expression)[1..-1]
       end
 
       private</diff>
      <filename>lib/spec/story/step.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,12 +2,17 @@ require File.dirname(__FILE__) + '/story_helper'
 
 module Spec
   module Story
-    describe Step, &quot;matching&quot; do
+    describe Step, &quot;#matching&quot; do
       it &quot;should match a text string&quot; do
         step = Step.new(&quot;this text&quot;) {}
         step.matches?(&quot;this text&quot;).should be_true
       end
       
+      it &quot;should match a text string that has additional line returns&quot; do
+        step = Step.new(&quot;this text&quot;) {}
+        step.matches?(&quot;this text\n\n&quot;).should be_true
+      end
+      
       it &quot;should not match a text string that does not start the same&quot; do
         step = Step.new(&quot;this text&quot;) {}
         step.matches?(&quot;Xthis text&quot;).should be_false
@@ -133,7 +138,7 @@ module Spec
       end
       
       it &quot;should match a multiline regex&quot; do
-        step = Step.new(/.* should have text.$text/) {}
+        step = Step.new(/.*should have text.$text/) {}
         step.matches?(&lt;&lt;TEXT).should be_true
           should have text
           this is the text
@@ -158,6 +163,18 @@ TEXT
       end
     end
     
+    describe Step, &quot;#parse_args&quot; do
+      it &quot;should return an empty array for a text string with no parameters&quot; do
+        step = Step.new(&quot;this text&quot;) {}
+        step.parse_args(&quot;this text&quot;).should == []
+      end
+      
+      it &quot;should return an empty array for a text string with additional line returns and no parameters&quot; do
+        step = Step.new(&quot;this text&quot;) {}
+        step.parse_args(&quot;this text\n\n&quot;).should == []
+      end
+    end
+    
     describe Step do
       it &quot;should be pending with no block&quot; do
         step = Step.new(&quot;foo&quot;)</diff>
      <filename>spec/spec/story/step_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>134c0f94e94f89938a941af5d74d9b303036fe08</id>
    </parent>
  </parents>
  <author>
    <name>Ben Mabey</name>
    <email>ben@benmabey.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec/commit/dc359c78147166bc9688ea49a5ebf237478e6f24</url>
  <id>dc359c78147166bc9688ea49a5ebf237478e6f24</id>
  <committed-date>2008-07-19T08:03:20-07:00</committed-date>
  <authored-date>2008-07-18T22:38:45-07:00</authored-date>
  <message>Fix for Story runner that handles the case when plaintext steps are read in with unintentional
new lines and the end of them (due to comments) resulting in StepMother not being able to find
the step's implementation.</message>
  <tree>35fc71a9621f27c63ca32fba6169c24d215166b0</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </committer>
</commit>
