Lookup sources during development

0 views
Skip to first unread message

Matt Lins

unread,
Jul 29, 2008, 3:39:18 PM7/29/08
to RubiGen
Hello,

I'm developing a framework. So, I'm constantly doing an install_gem
to test etc.

I'm using rSpec to test my generators. I just ported some helpers
from the test:unit stuff that is included:

http://gist.github.com/3155

This works, except if the gem is installed it'll _ALWAYS_ use that
generator as opposed to the source path I give it.

I thought by:

source = RubiGen::PathSource.new(:component,
File.join(File.dirname(__FILE__), "../generators"))
RubiGen::Base.reset_sources
RubiGen::Base.prepend_sources source

...it would reset all sources and only search the one I provide. Not
the case. A quick search throught the codebase I see if sources is
empty it'll automatically populate it.

Is there anywhere to clear sources and provide only one path to search?

Matt Lins

unread,
Jul 29, 2008, 3:40:35 PM7/29/08
to RubiGen
Also, I realize that spec is not doing anything. I'm just looking at
the output for now.

Nic Williams

unread,
Jul 29, 2008, 7:59:30 PM7/29/08
to rub...@googlegroups.com
If you come up with rspec helpers + stubs for tests I can integrate them into the component/application_generators so they generate specs or tests based on what you are using.

Nic
--
Dr Nic Williams
Fun with iPhone/Ruby/Rails/Javascript - http://drnicwilliams.com
* Learn TextMate for Rails2 - http://peepcode.com/products/textmate-for-rails-2 *

Nic Williams

unread,
Jul 29, 2008, 8:00:33 PM7/29/08
to rub...@googlegroups.com
What I mean is, when you get your code working, re-pastie it and I'll integrate it.
Reply all
Reply to author
Forward
0 new messages