[rspec-users] Newbie : how to require to lib from spec under autotest?

Peter Fitzgibbons peter.fitzgibbons at gmail.com
Sat Apr 5 00:28:00 EDT 2008


Hello all,

I have the RSpec sample in ./rspec_bowling, with...
./rspec_bowling/lib/bowling.rb
./rspec_bowling/spec/spec.opts
./rspec_bowling/spec/bowling_spec.rb

when I autotest, I get this:
$autotest
loading autotest/rspec
/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
F

1)
ArgumentError in 'Bowling should score 0 for gutter game'
wrong number of arguments (1 for 0)
[..snip..]
Finished in 0.254 seconds

1 example, 1 failure
/usr/local/bin/ruby -S
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec -O spec/spec.opts
spec/bowling_spec.rb
*./spec/bowling_spec.rb:3:in `require': no such file to load -- bowling
(LoadError)
*        from ./spec/bowling_spec.rb:3

My RUBYPATH = ../lib:./lib:$PATH, which caused autotest to load the 1st run
correctly.

Could someone help me understand how to correctly set the search path for
repeated loading under autotest ?

Thanks!


-- 
Peter Fitzgibbons
------------------------------
iPhone -- "IT"-ness.
href=
http://www.macdailynews.com/index.php/weblog/comments/apples_iphone_could_become_iconic_it_object
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080404/bdcff836/attachment.html 


More information about the rspec-users mailing list