[rspec-users] Testing lib code
scott at railsnewbie.com
Tue Dec 30 14:08:50 EST 2008
On Dec 30, 2008, at 2:02 PM, Peter Jaros wrote:
> On Tue, Dec 30, 2008 at 12:50 PM, s.ross <cwdinfo at gmail.com> wrote:
>> This question has, I'm sure, been asked and answered hundreds of
>> times, but
>> I was unable to turn up anything in Google. Here's the issue: I
>> have some
>> code in a Rails app in the lib/ directory that affects how views are
>> existence and
>> some application-specific stuff, then injects them into the right
>> part of
>> the HTML that's rendered.
> To be honest, this smells funny to me. Why is something in lib/
> affecting how views are rendered?
> Or does it need to be called or "activated" by something in the
> controller layer to take effect? That would make sense, but it would
> be a bit tricky to spec. I'm not sure there's enough information here
> about how it functions to give a good suggestion.
If you already have code, posting it surely would help.
More information about the rspec-users