<br><br><div class="gmail_quote">On Sat, Apr 5, 2008 at 6:08 AM, Peter Fitzgibbons <<a href="mailto:peter.fitzgibbons@gmail.com">peter.fitzgibbons@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br><div class="gmail_quote">On Sat, Apr 5, 2008 at 12:03 AM, Scott Taylor <<a href="mailto:mailing_lists@railsnewbie.com" target="_blank">mailing_lists@railsnewbie.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br><div><div><div>On Apr 5, 2008, at 12:38 AM, David Chelimsky wrote:</div><br><blockquote type="cite"><div bgcolor="#FFFFFF"><div>On Apr 5, 2008, at 12:28 AM, "Peter Fitzgibbons" <<a href="mailto:peter.fitzgibbons@gmail.com" target="_blank">peter.fitzgibbons@gmail.com</a>> wrote:<br>
</div><div><br></div><div></div><blockquote type="cite"><div>Hello all,<br><br>I have the RSpec sample in ./rspec_bowling, with...<br>./rspec_bowling/lib/bowling.rb<br>./rspec_bowling/spec/spec.opts<br>./rspec_bowling/spec/bowling_spec.rb<br>
<br>when I autotest, I get this:<br>$autotest<br> loading autotest/rspec<br>/usr/local/bin/ruby -S /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec -O spec/spec.opts spec/spec_helper.rb spec/bowling_spec.rb<br>F<br>
<br>1)<br>ArgumentError in 'Bowling should score 0 for gutter game'<br> wrong number of arguments (1 for 0)<br>[..snip..]</div></blockquote><div><br></div><div>This is the error - no path problem. There is a method expecting no arguments that is being called with one.</div>
<div><br></div><div>HTH,</div><div>David</div></div></blockquote><div><br></div></div>Sure - that test fails - but why do we see the next result? (see below) What is rails doing in the background?</div><div><br></div><font color="#888888"><div>
Scott</div></font></div></blockquote></div><br><br></div>This is not a rails app, it's standalone ruby.<br>
<br>
And yes, as I highlighted,the interesting bit is the second run where instead 'require' fails.<br>
<br>
Thanks in advance for further discussion!<br><font color="#888888">
<br>
Peter<br><br>
</font></blockquote></div><br>Hello All,<br><br>Thanks for your tips.<br>In the end, what I needed was a lesson on Ruby Load Path. Pickaxe 2 pp172 "Where Ruby finds its modules" gave me the answer. I needed to set environment variable RUBYLIB<br>
<br>export RUBYLIB=./lib:../lib<br><br>so that <br><br><font size="1"><span style="font-family: courier new,monospace;">$ruby -e 'puts $:'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">./lib</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">../lib</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/local/lib/ruby/site_ruby/1.8</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/local/lib/ruby/site_ruby/1.8/i386-cygwin</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/local/lib/ruby/site_ruby</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/local/lib/ruby/1.8</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/local/lib/ruby/1.8/i386-cygwin</span><br style="font-family: courier new,monospace;">
</font>.<br>Now autotest gets the proper require twice in a row, when the spec file reads :<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">require 'bowling'</span><br style="font-family: courier new,monospace;">
<br>Hope this helps you, next grasshopper of the RSpec FU!<br><br>-- <br>Peter Fitzgibbons<br>------------------------------<br>iPhone -- "IT"-ness.<br>href=<a href="http://www.macdailynews.com/index.php/weblog/comments/apples_iphone_could_become_iconic_it_object">http://www.macdailynews.com/index.php/weblog/comments/apples_iphone_could_become_iconic_it_object</a><br>
------------------------------