Could you put a mocking expectation on Kernel? (which is where
#require is defined)
Kernel.should_receive(:require).with(expected_file_name)
On 31 Aug 2008, at 15:36, 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, so it always picks up new files. Clearly I need
to change that and be more specific in my require lines.
Any suggestions on how to best accomplish this?
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