On Sun, Aug 31, 2008 at 2:38 PM, Chuck Remes <[EMAIL PROTECTED]> wrote: > > On Aug 31, 2008, at 12:42 PM, Scott Taylor wrote: > >> >> On Aug 31, 2008, at 10:36 AM, Chuck Remes wrote: >> >>> I looked through the mailing list archive but unfortunately my search >>> terms are too generic (spec and require...). >>> >>> I am writing ruby code that runs under jruby in an embedded environment. >>> Periodically I will install new code that passes all specs only to have it >>> fail when it can't find a new class I defined (missing #require). >>> >>> My spec_helper.rb file does a wildcard search and loads all rb files in >>> the tree, >> >> Why? Why don't you just have it load lib/your_project_name.rb, which >> requires everything else? > > I don't know. Is that the right way to do it? The way I am doing it now > mimics how the rspec gem includes all of the rspec files for testing,
It does? What I see is that the spec files all include spec_helper.rb, which, in turn, adds lib to the path and then requires 'spec'. What are you thinking of when you say the gem includes all the files for testing? > so I > took that as an accepted practice. I'll be happy to try your method if it > doesn't have a hidden gotcha too. > > cr > > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users