On Mon, Sep 15, 2008 at 12:26 PM, Christopher Bailey
<[EMAIL PROTECTED]> wrote:
> I'm trying to test some of my helpers. I have one helper (in module
> LocationsHelper) that calls a helper/method in ApplicationHelper. If I
> include ApplicationHelper and LocationHelper in my spec, and then I call the
> helper using the "helper." scope:
> helper.location_tree('Portland')
> then it complains that it can't find the other helper it uses from
> ApplicationHelper. If instead, I call it directly:
> location_tree('Portland')
> Then, it can't find the Rails' generated URL helpers (e.g. "location_path"
> or "location_url"). How do I make it so that all the dependencies or Rails'
> included stuff is found?
You don't need to include the helpers if you are using the helper
object. You should be able to do just this:
describe LocationsHelper do
it "should ..." do
helper.location_tree('Portland').should ...
end
end
Have you tried that? Does it fail?
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users