<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Jorge Manrubia</title>
	<atom:link href="http://jorgemanrubia.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://jorgemanrubia.net</link>
	<description>Personal Page</description>
	<lastBuildDate>Wed, 26 Oct 2011 09:24:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Using delayed_job with Cucumber by Jorge Manrubia</title>
		<link>http://jorgemanrubia.net/2010/09/01/using-delayed_job-with-cucumber/comment-page-1/#comment-563</link>
		<dc:creator>Jorge Manrubia</dc:creator>
		<pubDate>Wed, 26 Oct 2011 09:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/?p=523#comment-563</guid>
		<description>&lt;p&gt;Hi Phil. I am using a :deletion strategy. Anyway, I was using a :transaction strategy before and I didn&#039;t have problems with delayed_job. You can aslo leave delayed_job out of the deletion strategy if you use the :except option (I don&#039;t do it). Thanks for your feedback&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Phil. I am using a :deletion strategy. Anyway, I was using a :transaction strategy before and I didn&#8217;t have problems with delayed_job. You can aslo leave delayed_job out of the deletion strategy if you use the :except option (I don&#8217;t do it). Thanks for your feedback</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using delayed_job with Cucumber by Phil</title>
		<link>http://jorgemanrubia.net/2010/09/01/using-delayed_job-with-cucumber/comment-page-1/#comment-562</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Tue, 25 Oct 2011 20:10:16 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/?p=523#comment-562</guid>
		<description>&lt;p&gt;I like this idea but the only problem with this approach is that you can&#039;t then use the transaction database_cleaner strategy.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I like this idea but the only problem with this approach is that you can&#8217;t then use the transaction database_cleaner strategy.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dependency injection and other Java necessary evils by solid_assert: A simple Ruby assertion utility - Jorge Manrubia</title>
		<link>http://jorgemanrubia.net/2010/05/30/dependency-injection-and-other-java-necessary-evils/comment-page-1/#comment-558</link>
		<dc:creator>solid_assert: A simple Ruby assertion utility - Jorge Manrubia</dc:creator>
		<pubDate>Mon, 19 Sep 2011 23:05:05 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/?p=470#comment-558</guid>
		<description>&lt;p&gt;[...] the same thing with dependency injection frameworks. But, while after a time working with Ruby I was convinced that I didn&#8217;t need a dependency injection framework, I still miss assertions when programming [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] the same thing with dependency injection frameworks. But, while after a time working with Ruby I was convinced that I didn&#8217;t need a dependency injection framework, I still miss assertions when programming [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dependency injection and other Java necessary evils by Asbjørn</title>
		<link>http://jorgemanrubia.net/2010/05/30/dependency-injection-and-other-java-necessary-evils/comment-page-1/#comment-557</link>
		<dc:creator>Asbjørn</dc:creator>
		<pubDate>Sun, 11 Sep 2011 21:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/?p=470#comment-557</guid>
		<description>&lt;p&gt;This is not a problem when using a stubbing-tool that doesn&#039;t need injection :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is not a problem when using a stubbing-tool that doesn&#8217;t need injection <img src='http://jorgemanrubia.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Comparing EMF Models by Jorge Manrubia</title>
		<link>http://jorgemanrubia.net/2008/07/06/comparing-emf-models/comment-page-1/#comment-556</link>
		<dc:creator>Jorge Manrubia</dc:creator>
		<pubDate>Sun, 07 Aug 2011 11:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/blog/?p=30#comment-556</guid>
		<description>&lt;p&gt;Thank you Fabian. Your approach seems much better. Thanks for sharing it!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you Fabian. Your approach seems much better. Thanks for sharing it!</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Comparing EMF Models by Fabian</title>
		<link>http://jorgemanrubia.net/2008/07/06/comparing-emf-models/comment-page-1/#comment-555</link>
		<dc:creator>Fabian</dc:creator>
		<pubDate>Thu, 04 Aug 2011 08:50:49 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/blog/?p=30#comment-555</guid>
		<description>&lt;p&gt;Hi, the sorting didn’t worked for my EObjects, i think its sometimes not enough to take the Standard toString Method to sort by. So I have written my own EqualityHelper that really compares the two Lists without a care of order if the Ordered Attribute of the Reference is false. It works finde :)&lt;/p&gt;

&lt;p&gt;
[cc lang=&quot;java&quot;]
import java.util.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.EcoreUtil.EqualityHelper;

public class CustomEqualityHelper extends EcoreUtil.EqualityHelper {

private static final long serialVersionUID = 1L;

public CustomEqualityHelper() {
    super();
}

private CustomEqualityHelper(CustomEqualityHelper emfComparator) {
    this.putAll(emfComparator);
}

@SuppressWarnings(&quot;unchecked&quot;)
@Override
protected boolean haveEqualReference(EObject eObject1, EObject eObject2, EReference reference)
{
  Object value1 = eObject1.eGet(reference);
  Object value2 = eObject2.eGet(reference);

  if(reference.isMany())
  {
      // *** important change for Unordered Lists here:
      if(reference.isOrdered())
          return equals((List&lt;EObject&gt;)value1, (List&lt;EObject&gt;)value2);
      else
          return equalsUnOrdered((List&lt;EObject&gt;)value1, (List&lt;EObject&gt;)value2);
  }
  else
  {
      return equals((EObject)value1, (EObject)value2);
  }

}

public boolean equalsUnOrdered(List&lt;EObject&gt; list1, List&lt;EObject&gt; list2)
{
    // if the Lists haven&#039;t the same size they can&#039;t be equal
    if(list1.size()!=list2.size()) return false;

    // save the Equal pairs: list1 Elements as Key and list2 Elements as Value
Map&lt;EObject,EObject&gt; equalFound = new HashMap&lt;EObject,EObject&gt;();

    for(EObject list1El:list1)
{
    // try to find an equal Element for list1El in list2
    for(EObject list2El:list2)
    {
        // skip Elements of list2 that already have an equal Element in list1
        if(!equalFound.containsValue(list2El)) 
            // if list list1El is equal to list2El save it the Map
            // create a copy of the CustomEqualityHelper because it&#039;s made only for one recursive Compare
            if(new CustomEqualityHelper(this).equals(list1El, list2El)) 
            {
                equalFound.put(list1El, list2El);
                break;
            }
    }

    // if no equal Element for listEl1 was found in list2, they couldn&#039;t be equal
    if(!equalFound.containsKey(list1El)) return false; 

    }

// For all Elements of list1 an own equal Element in list2 was found.
return true;
[/cc]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, the sorting didn’t worked for my EObjects, i think its sometimes not enough to take the Standard toString Method to sort by. So I have written my own EqualityHelper that really compares the two Lists without a care of order if the Ordered Attribute of the Reference is false. It works finde <img src='http://jorgemanrubia.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>

<div class="codecolorer-container java blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.*</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.eclipse.emf.ecore.EObject</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.eclipse.emf.ecore.EReference</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.eclipse.emf.ecore.EStructuralFeature</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.eclipse.emf.ecore.util.EcoreUtil</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.eclipse.emf.ecore.util.EcoreUtil.EqualityHelper</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CustomEqualityHelper <span style="color: #000000; font-weight: bold;">extends</span> EcoreUtil.<span style="color: #006633;">EqualityHelper</span> <span style="color: #009900;">&#123;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">long</span> serialVersionUID <span style="color: #339933;">=</span> 1L<span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> CustomEqualityHelper<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">private</span> CustomEqualityHelper<span style="color: #009900;">&#40;</span>CustomEqualityHelper emfComparator<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">putAll</span><span style="color: #009900;">&#40;</span>emfComparator<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
@SuppressWarnings<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;unchecked&quot;</span><span style="color: #009900;">&#41;</span><br />
@Override<br />
<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">boolean</span> haveEqualReference<span style="color: #009900;">&#40;</span>EObject eObject1, EObject eObject2, EReference reference<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> value1 <span style="color: #339933;">=</span> eObject1.<span style="color: #006633;">eGet</span><span style="color: #009900;">&#40;</span>reference<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> value2 <span style="color: #339933;">=</span> eObject2.<span style="color: #006633;">eGet</span><span style="color: #009900;">&#40;</span>reference<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>reference.<span style="color: #006633;">isMany</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// *** important change for Unordered Lists here:</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>reference.<span style="color: #006633;">isOrdered</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> equals<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>List<span style="color: #339933;">&lt;</span>EObject<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span>value1, <span style="color: #009900;">&#40;</span>List<span style="color: #339933;">&lt;</span>EObject<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span>value2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> equalsUnOrdered<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>List<span style="color: #339933;">&lt;</span>EObject<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span>value1, <span style="color: #009900;">&#40;</span>List<span style="color: #339933;">&lt;</span>EObject<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span>value2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> equals<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>EObject<span style="color: #009900;">&#41;</span>value1, <span style="color: #009900;">&#40;</span>EObject<span style="color: #009900;">&#41;</span>value2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> equalsUnOrdered<span style="color: #009900;">&#40;</span>List<span style="color: #339933;">&lt;</span>EObject<span style="color: #339933;">&gt;</span> list1, List<span style="color: #339933;">&lt;</span>EObject<span style="color: #339933;">&gt;</span> list2<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// if the Lists haven't the same size they can't be equal</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>list1.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=</span>list2.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// save the Equal pairs: list1 Elements as Key and list2 Elements as Value</span><br />
Map<span style="color: #339933;">&lt;</span>EObject,EObject<span style="color: #339933;">&gt;</span> equalFound <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HashMap<span style="color: #339933;">&lt;</span>EObject,EObject<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>EObject list1El<span style="color: #339933;">:</span>list1<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// try to find an equal Element for list1El in list2</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>EObject list2El<span style="color: #339933;">:</span>list2<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// skip Elements of list2 that already have an equal Element in list1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>equalFound.<span style="color: #006633;">containsValue</span><span style="color: #009900;">&#40;</span>list2El<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// if list list1El is equal to list2El save it the Map</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// create a copy of the CustomEqualityHelper because it's made only for one recursive Compare</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> CustomEqualityHelper<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>list1El, list2El<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; equalFound.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span>list1El, list2El<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// if no equal Element for listEl1 was found in list2, they couldn't be equal</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>equalFound.<span style="color: #006633;">containsKey</span><span style="color: #009900;">&#40;</span>list1El<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span> <br />
<br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// For all Elements of list1 an own equal Element in list2 was found.</span><br />
<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span></div></div>

</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using delayed_job with Cucumber by Jorge Manrubia</title>
		<link>http://jorgemanrubia.net/2010/09/01/using-delayed_job-with-cucumber/comment-page-1/#comment-552</link>
		<dc:creator>Jorge Manrubia</dc:creator>
		<pubDate>Tue, 26 Apr 2011 14:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/?p=523#comment-552</guid>
		<description>&lt;p&gt;Ey Sean, thanks for the tip. It looks cleaner. By the way, I am currently running cucumber features in parallel using the parallel_tests gem&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ey Sean, thanks for the tip. It looks cleaner. By the way, I am currently running cucumber features in parallel using the parallel_tests gem</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using delayed_job with Cucumber by Sean</title>
		<link>http://jorgemanrubia.net/2010/09/01/using-delayed_job-with-cucumber/comment-page-1/#comment-551</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Tue, 26 Apr 2011 13:22:34 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/?p=523#comment-551</guid>
		<description>&lt;p&gt;I&#039;ve had to do this as well and approached it in a slightly different way. See http://lineonpoint.com/2010/10/26/run-cucumber-scenarios-paralell/&lt;/p&gt;

&lt;p&gt;This should resolve your RAILS_ENV issue, and gives dealyed_job a chance to shutdown gracefully.&lt;/p&gt;

&lt;p&gt;It can be called with CucumberDelayedJob.start and CucumberDelayedJob.stop_worker in your Before and After hooks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had to do this as well and approached it in a slightly different way. See <a href="http://lineonpoint.com/2010/10/26/run-cucumber-scenarios-paralell/" rel="nofollow">http://lineonpoint.com/2010/10/26/run-cucumber-scenarios-paralell/</a></p>

<p>This should resolve your RAILS_ENV issue, and gives dealyed_job a chance to shutdown gracefully.</p>

<p>It can be called with CucumberDelayedJob.start and CucumberDelayedJob.stop_worker in your Before and After hooks.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using delayed_job with Cucumber by Jorge Manrubia</title>
		<link>http://jorgemanrubia.net/2010/09/01/using-delayed_job-with-cucumber/comment-page-1/#comment-550</link>
		<dc:creator>Jorge Manrubia</dc:creator>
		<pubDate>Fri, 22 Apr 2011 06:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/?p=523#comment-550</guid>
		<description>&lt;p&gt;Thank you very much for the feedback and for the tip. There is already a method &#039;wait_until&#039; in capybara that does exactly that. It waits for something to be true, or raises a timeout exception if the condition is not satisfied in the specified period of time. Your example could be rewritten like this:&lt;/p&gt;

&lt;p&gt;&lt;code lang=&quot;ruby&quot;&gt;
    wait_until(11) { has_content?(content) }
&lt;/code&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you very much for the feedback and for the tip. There is already a method &#8216;wait_until&#8217; in capybara that does exactly that. It waits for something to be true, or raises a timeout exception if the condition is not satisfied in the specified period of time. Your example could be rewritten like this:</p>

<p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; wait_until<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">11</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> has_content?<span style="color:#006600; font-weight:bold;">&#40;</span>content<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span></div></div>

</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using delayed_job with Cucumber by Missing Handle</title>
		<link>http://jorgemanrubia.net/2010/09/01/using-delayed_job-with-cucumber/comment-page-1/#comment-549</link>
		<dc:creator>Missing Handle</dc:creator>
		<pubDate>Thu, 21 Apr 2011 21:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://jorgemanrubia.net/?p=523#comment-549</guid>
		<description>&lt;p&gt;In return, I contribute this cucumber step I just came up with to be as efficient as possible in waiting for delayed_job jobs:&lt;/p&gt;

&lt;p&gt;&lt;code lang=&quot;ruby&quot;&gt;
Then /^the wait dance on &quot;([^&quot;]&lt;em&gt;)&quot; for &quot;([^&quot;]&lt;/em&gt;)&quot; should be successful$/ do &#124;path, content&#124;
  success = false
  11.times do
    visit path
    success = true and break if page.has_content?(content)
    sleep 1
  end
  success.should be_true
end
&lt;/code&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>In return, I contribute this cucumber step I just came up with to be as efficient as possible in waiting for delayed_job jobs:</p>

<p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">Then</span> <span style="color:#006600; font-weight:bold;">/</span>^the wait dance on <span style="color:#996600;">&quot;([^&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&lt;</span>em<span style="color:#006600; font-weight:bold;">&gt;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#996600;">&quot; for &quot;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span>^<span style="color:#996600;">&quot;]&lt;/em&gt;)&quot;</span> should be successful$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>path, content<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; success = <span style="color:#0000FF; font-weight:bold;">false</span><br />
&nbsp; <span style="color:#006666;">11</span>.<span style="color:#9900CC;">times</span> <span style="color:#9966CC; font-weight:bold;">do</span><br />
&nbsp; &nbsp; visit path<br />
&nbsp; &nbsp; success = <span style="color:#0000FF; font-weight:bold;">true</span> <span style="color:#9966CC; font-weight:bold;">and</span> <span style="color:#9966CC; font-weight:bold;">break</span> <span style="color:#9966CC; font-weight:bold;">if</span> page.<span style="color:#9900CC;">has_content</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>content<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">sleep</span> <span style="color:#006666;">1</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; success.<span style="color:#9900CC;">should</span> be_true<br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>

</p>]]></content:encoded>
	</item>
</channel>
</rss>

