Hi,
I’m using the Searchlogic plugin. Since I have added the search form in
the index template,
the view spec doesn’t work anymore.
Controller
def index
@search = PlPlanning.new_search(params[:search])
@search.order_by = :id
@pl_plannings, @count = @search.all, @search.count
end
view
<%= f.submit "Search" %> <% end %> <% end %>
spec
class Searchlogic::Cache::PlPlanningSearch; end
…
before(:each) do
@pl_plannings = []
assigns[:pl_plannings] = @pl_plannings
@search = Searchlogic::Cache::PlPlanningSearch.new ???
assigns[:search] = @search
render “/planning/pl_plannings/index”
end
…
=> Error in the line containing the remote_form_for call
undefined method `planning_searchlogic_cache_pl_planning_search_path’
for #ActionView::Base:0x6b6bf38
Has anybody experience with Searchlogic + rspec ? Can I stub
search_paths ?
Thanks
Andrea
Verschicken Sie SMS direkt vom Postfach aus - in alle deutschen und
viele
ausländische Netze zum gleichen Preis!