I believe I was a bit quick on this one....<br><br>Of course, if you can&#39;t run your tests, the build should fail and return non-0 as fast as possible.<br><br>However, it would be nice to distinguish between errors and failures. I initially thought rake would output &quot;rake aborted!&quot; only when you have errors - not just failing tests, and as a ruby newbie I sometimes found it hard to know if I had an error or just a failing test.
<br><br>Does this make more sense?<br><br>Stefan<br><br><div><span class="gmail_quote">2007/11/28, aslak hellesoy &lt;<a href="mailto:aslak.hellesoy@gmail.com">aslak.hellesoy@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 11/28/07, Stefan Magnus Landrø &lt;<a href="mailto:stefan.landro@gmail.com">stefan.landro@gmail.com</a>&gt; wrote:<br>&gt; We saw some annoying behavior related to pending tests. Maybe you could<br>&gt; delete it and rerun your specs?
<br>&gt;<br>&gt; An error typically indicates that you have some sort of error in your code -<br>&gt; failing tests should not cause rake to abort.<br>&gt;<br><br>It does, and it should. Failures are just as fatal as errors, and
<br>should make rake exit with a non-0.<br><br>Aslak<br><br>&gt; Stefan<br>&gt;<br>&gt; 2007/11/25, James B. Byrne &lt;<a href="mailto:byrnejb@harte-lyne.ca">byrnejb@harte-lyne.ca</a>&gt;:<br>&gt; &gt; Sorry to be such a pest but I am trying to learn Ruby, Rails and RSpec all
<br>&gt; &gt; at one go and it is a bit overwhelming.&nbsp;&nbsp;I have previously completed the<br>&gt; &gt; depot tutorial in the Agile Web Dev with rails book and now I am trying do<br>&gt; &gt; do it again using RSpec.<br>&gt; &gt;
<br>&gt; &gt; What I would like to know now is why I am getting a rake failure error at<br>&gt; &gt; the end of every spec:models run.&nbsp;&nbsp;Is this the expected behaviour when a<br>&gt; &gt; test / expectation fails?<br>&gt; &gt;
<br>&gt; &gt; ---&gt;<br>&gt; &gt;<br>&gt; &gt; C:\var\RSpec\depot&gt;rake spec:models<br>&gt; &gt; (in C:/var/RSpec/depot)<br>&gt; &gt; NOTICE:&nbsp;&nbsp;CREATE TABLE will create implicit sequence &quot;products_id_seq&quot; for<br>
&gt; &gt; serial<br>&gt; &gt; column &quot; <a href="http://products.id">products.id</a>&quot;<br>&gt; &gt; NOTICE:&nbsp;&nbsp;CREATE TABLE / PRIMARY KEY will create implicit index<br>&gt; &gt; &quot;products_pkey&quot; f<br>&gt; &gt; or table &quot;products&quot;
<br>&gt; &gt;<br>&gt; &gt; Product<br>&gt; &gt; - should have a valid image uri (PENDING: Not Yet Implemented)<br>&gt; &gt; - should have a description<br>&gt; &gt; - should have a title (FAILED - 1)<br>&gt; &gt;<br>&gt; &gt; Pending:
<br>&gt; &gt; Product should have a valid image uri (Not Yet Implemented)<br>&gt; &gt;<br>&gt; &gt; 1)<br>&gt; &gt; &#39;Product should have a title&#39; FAILED<br>&gt; &gt; expected valid? to return true, got false<br>&gt; &gt; ./spec/models/product_spec.rb:11:
<br>&gt; &gt;<br>&gt; &gt; Finished in 0.75 seconds<br>&gt; &gt;<br>&gt; &gt; 3 examples, 1 failure, 1 pending<br>&gt; &gt; rake aborted!<br>&gt; &gt; Command ruby -I<br>&gt; &gt; &quot;C:/var/RSpec/depot/vendor/plugins/rspec/lib&quot;
<br>&gt; &gt; &quot;C:/var/RSpec/depot/vendor/plugins/rspec/bin/spec&quot;<br>&gt; &gt; &quot;spec/models/product_spec.rb&quot;<br>&gt; &gt; --options<br>&gt; &gt; &quot;C:/var/RSpec/depot/config/../spec/spec.opts&quot; failed
<br>&gt; &gt;<br>&gt; &gt; (See full trace by running task with --trace)<br>&gt; &gt;<br>&gt; &gt; C:\var\RSpec\depot&gt;rake spec:models --trace<br>&gt; &gt; (in C:/var/RSpec/depot)<br>&gt; &gt; ** Invoke spec:models (first_time)
<br>&gt; &gt; ** Invoke db:test:prepare (first_time)<br>&gt; &gt; ** Invoke environment (first_time)<br>&gt; &gt; ** Execute environment<br>&gt; &gt; ** Execute db:test:prepare<br>&gt; &gt; ** Invoke db:test:clone (first_time)
<br>&gt; &gt; ** Invoke db:schema:dump (first_time)<br>&gt; &gt; ** Invoke environment<br>&gt; &gt; ** Execute db:schema:dump<br>&gt; &gt; ** Invoke db:test:purge (first_time)<br>&gt; &gt; ** Invoke environment<br>&gt; &gt; ** Execute db:test:purge
<br>&gt; &gt; ** Execute db:test:clone<br>&gt; &gt; ** Invoke db:schema:load (first_time)<br>&gt; &gt; ** Invoke environment<br>&gt; &gt; ** Execute db:schema:load<br>&gt; &gt; NOTICE:&nbsp;&nbsp;CREATE TABLE will create implicit sequence &quot;products_id_seq&quot; for
<br>&gt; &gt; serial column &quot;<a href="http://products.id">products.id</a>&quot;<br>&gt; &gt; NOTICE:&nbsp;&nbsp;CREATE TABLE / PRIMARY KEY will create implicit index<br>&gt; &gt; &quot;products_pkey&quot; for table &quot;products&quot;
<br>&gt; &gt; ** Execute spec:models<br>&gt; &gt;<br>&gt; &gt; Product<br>&gt; &gt; - should have a valid image uri (PENDING: Not Yet Implemented)<br>&gt; &gt; - should have a description<br>&gt; &gt; - should have a title (FAILED - 1)
<br>&gt; &gt;<br>&gt; &gt; Pending:<br>&gt; &gt; Product should have a valid image uri (Not Yet Implemented)<br>&gt; &gt;<br>&gt; &gt; 1)<br>&gt; &gt; &#39;Product should have a title&#39; FAILED<br>&gt; &gt; expected valid? to return true, got false
<br>&gt; &gt; ./spec/models/product_spec.rb:11:<br>&gt; &gt;<br>&gt; &gt; Finished in 0.563 seconds<br>&gt; &gt;<br>&gt; &gt; 3 examples, 1 failure, 1 pending<br>&gt; &gt; rake aborted!<br>&gt; &gt; Command ruby<br>&gt; -I&quot;C:/var/RSpec/depot/vendor/plugins/rspec/lib&quot;
<br>&gt; &gt; &quot;C:/var/RSpec/depot/vendor/plugins/rspec/bin/spec&quot;<br>&gt; &quot;spec/models/<br>&gt; &gt; product_spec.rb&quot; --options<br>&gt; &quot;C:/var/RSpec/depot/config/../spec/spec.opts&quot;<br>&gt; &gt; failed
<br>&gt; &gt; C:/var/RSpec/depot/vendor/plugins/rspec/lib/spec/rake/<br>&gt; &gt; spectask.rb:173:in `define&#39;<br>&gt; &gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-<br>&gt; 0.7.3/lib/<br>&gt; &gt; rake.rb:823:in `verbose&#39;
<br>&gt; &gt; C:/var/RSpec/depot/vendor/plugins/rspec/lib/spec/rake/<br>&gt; &gt; spectask.rb:142:in `define&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/<br>&gt; &gt; rake.rb:392:in `call&#39;
<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/<br>&gt; &gt; rake.rb:392:in `execute&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/<br>&gt; &gt; rake.rb
:392:in `each&#39;<br>&gt; &gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-<br>&gt; 0.7.3/lib/<br>&gt; &gt; rake.rb:392:in `execute&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
<br>&gt; &gt; rake.rb:362:in `invoke&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/<br>&gt; &gt; rake.rb:355:in `synchronize&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-
0.7.3/lib/<br>&gt; &gt; rake.rb:355:in `invoke&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/<br>&gt; &gt; rake.rb:1739:in `top_level&#39;<br>&gt; &gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-
<br>&gt; 0.7.3/lib/<br>&gt; &gt; rake.rb:1739:in `each&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/<br>&gt; &gt; rake.rb:1739:in `top_level&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-
0.7.3/lib/<br>&gt; &gt; rake.rb:1761:in `standard_exception_handling&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/<br>&gt; &gt; rake.rb:1733:in `top_level&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-
0.7.3/lib/<br>&gt; &gt; rake.rb:1711:in `run&#39;<br>&gt; &gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-<br>&gt; 0.7.3/lib/<br>&gt; &gt; rake.rb:1761:in `standard_exception_handling&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-
0.7.3/lib/<br>&gt; &gt; rake.rb:1708:in `run&#39;<br>&gt; &gt;<br>&gt; C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7<br>&gt; &gt; C:/usr/local/bin/ruby/bin/rake.bat:20:in `load&#39;<br>&gt; &gt; C:/usr/local/bin/ruby/bin/rake.bat:20
<br>&gt; &gt;<br>&gt; &gt; C:\var\RSpec\depot&gt;<br>&gt; &gt; &lt;---<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; ***&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-Mail is NOT a SECURE channel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;***<br>&gt; &gt; James B. Byrne&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mailto: 
<a href="mailto:ByrneJB@Harte-Lyne.ca">ByrneJB@Harte-Lyne.ca</a><br>&gt; &gt; Harte &amp; Lyne Limited&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.harte-lyne.ca">http://www.harte-lyne.ca</a><br>&gt; &gt; 9 Brockley Drive&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vox: +1 905 561 1241
<br>&gt; &gt; Hamilton, Ontario&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fax: +1 905 561 0757<br>&gt; &gt; Canada&nbsp;&nbsp;L8E 3C3<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; rspec-users mailing list<br>&gt; &gt; <a href="mailto:rspec-users@rubyforge.org">
rspec-users@rubyforge.org</a><br>&gt; &gt; <a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Bekk Open Source
<br>&gt; <a href="http://boss.bekk.no">http://boss.bekk.no</a><br>&gt; _______________________________________________<br>&gt; rspec-users mailing list<br>&gt; <a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org
</a><br>&gt; <a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br>&gt;<br>_______________________________________________<br>rspec-users mailing list<br><a href="mailto:rspec-users@rubyforge.org">
rspec-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Bekk Open Source<br><a href="http://boss.bekk.no">
http://boss.bekk.no</a>