For the controller that determines the behavior of the sidebar, I need to call several URLs; the sidebar will change (ao) based on the page on which it appears.
describe SidebarController do before(:each) do @sidebar = SidebarController.new end it 'should return :jobseekers for root_path' do get(root_url) @sidebar.section(root_path).should eq :jobseekers end end
This, however, fails with ActionController::RoutingError: No route matches {:controller=>"sidebar", :action=>"http://test.host/"}
Can I get to specify a url or path as a string? Is there a smarter way to set request. data request. instead of getting?
get rspec
berkes
source share