I was planning on using a fixture within a description that didn&#39;t modify the fixture, so I put it in a before(:all) block:<br><blockquote>describe &quot;Customer&quot;, &quot;xml&quot; do<br>&nbsp; fixtures :customers<br><br>
&nbsp; before(:all) do<br>
&nbsp;&nbsp;&nbsp; one = customers(:one)<br>&nbsp; end<br>&nbsp;<br>&nbsp; # ... <br>
</blockquote>
As a result, I got this message:<br><br><blockquote>1)<br>NoMethodError in &#39;Customer xml before(:all)&#39;<br>You have a nil object when you didn&#39;t expect it!<br>You might have expected an instance of Array.<br>The error occurred while evaluating nil.[]
<br>./spec/models/customer_spec.rb:86:<br>script/spec:4:<br></blockquote>If I convert it to before(:each) or simply before, it works just fine.<br><blockquote>describe &quot;Customer&quot;, &quot;xml&quot; do<br>
&nbsp; fixtures :customers<br><br>
&nbsp; before do<br>
&nbsp;&nbsp;&nbsp; one = customers(:one)<br>&nbsp; end<br>
&nbsp;<br>
&nbsp; # ... <br clear="all"></blockquote>
By design?&nbsp; bug?&nbsp; PEBKAC?&nbsp; Anyone else hit this?<br><br>&nbsp;&nbsp; - Geoffrey<br>-- <br>Geoffrey Wiseman<br>