how exam rspec rails plugin controlling "link_to" "current_page?"
i'm minute rails plugin builds adult menu view. i'm controlling link_to build couple current_page? set class="active" tide page.
i've included actionview::helpers::urlhelper i link_to.
to current_page? operative view, i've get tide category (apparently actionview::base) works ideally well. unfortunately, totally breaks tests rspec.
i'm job link_to current_page? this:
def menu(options = {}, &block)
grant = my_menu.new(self)
furnish carte
carte.to_s unless carte.empty?
end
class my_menu
consolidate actionview::helpers::taghelper
consolidate actionview::helpers::urlhelper
def initialize(base)
@base = base
end
def link
@base.link_to(name, url_options, html_options)
@base.current_page?(url_options)
end
end
and i blunder rspec:
capricious slight `link_to' #< spec::rails::example::railsexamplegroup::subclass_1:0x24afa90>
any clue?
Comments
Post a Comment