<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -127,32 +127,45 @@ describe &quot;EasySearch&quot; do
   end
   
   describe &quot;search terms&quot; do
-    def search(terms)
+    def extract(terms)
       Search.new(:users).send(:extract, terms)
     end
     
+    def strip_emails_from(text)
+      Search.new(:users).send(:strip_emails_from, text)
+    end
+    
     it &quot;should separate terms when parsing search terms&quot; do
-      search('ryan heath').should eql(['ryan', 'heath'])
+      extract('ryan heath').should eql(['ryan', 'heath'])
     end
     
     it &quot;should not search dull keywords&quot; do
-      search('ryan a the and or heath').should eql(['ryan', 'heath'])
+      extract('ryan a the and or heath').should eql(['ryan', 'heath'])
     end
     
     it &quot;should return an empty array if all keywords are dull&quot; do
-      search('a the and or').should eql([])
+      extract('a the and or').should eql([])
     end
     
     it &quot;should remove any conflicting apostrophe's in search terms&quot; do
-      search(&quot;ryan's stuff&quot;).should eql(['ryans', 'stuff'])
+      extract(&quot;ryan's stuff&quot;).should eql(['ryans', 'stuff'])
     end
     
     it &quot;should keep emails intact when contained within search terms&quot; do
-      search('ryan rph@test.com heath').should eql(['ryan', 'heath', 'rph@test.com'])
+      extract('ryan rph@test.com heath').should eql(['ryan', 'heath', 'rph@test.com'])
     end
     
     it &quot;should pull out dull keywords even if they're uppercase&quot; do
-      search('ryan A THE AND OR').should eql(['ryan'])
+      extract('ryan A THE AND OR').should eql(['ryan'])
+    end
+    
+    it &quot;should pull out the emails from the search terms&quot; do
+      strip_emails_from('ryan rph@test.com rph@other.com').
+        should eql(['rph@test.com', 'rph@other.com'])
+    end
+    
+    it &quot;should not have any emails to pull out of the search terms&quot; do
+      strip_emails_from('ryan heath').should eql([])
     end
   end
   </diff>
      <filename>spec/easy_search_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>609f23cf97306be6770456474254a8f07ed64c37</id>
    </parent>
  </parents>
  <author>
    <name>rpheath</name>
    <email>rpheath@gmail.com</email>
  </author>
  <url>http://github.com/rpheath/easy_search/commit/94b6c6199ed0af7b1f2cd7f78469f5e922ff3289</url>
  <id>94b6c6199ed0af7b1f2cd7f78469f5e922ff3289</id>
  <committed-date>2008-05-10T12:36:09-07:00</committed-date>
  <authored-date>2008-05-10T12:36:09-07:00</authored-date>
  <message>added specs to test email extraction from keywords</message>
  <tree>a9dc948cc07e7f67958f974e072e58512b862fab</tree>
  <committer>
    <name>rpheath</name>
    <email>rpheath@gmail.com</email>
  </committer>
</commit>
