Re: [rspec-users] rails /lib module testing

2009-11-16 Thread Elliot Winkler
That's because assigns only works in a Rails functional test. If you're the author of the module, you could add a self.included block that then sets up an attr_reader :link, like so: def self.included(base) base.class_eval do attr_reader :link end end Then, all you have to s

[rspec-users] rails /lib module testing

2009-11-16 Thread Andy Koch
I've seen several posts related, but not touching on what I'm wondering... I have a lib module that I'd like to do 'white-box' testing - similar to a Rails mvc. But I can't see how to get a handle on the internal instance vars in the method. here are some code snippets that probably best explain