Hi, I have a Queues controller and and QueueItems controller in my rails application. In routes I have defined as below `match 'queues/:queue_id/next', :to=> 'queueitems#next'` In my QueueItems Controller I have a next action and it assigns an instance variable. def next @queue = "Regular" #other stuffs related to regular end How do I test this in Rspec. I am pretty very new to Rspec. Please help. I tried like the below describe "next " do it "routes /queues/:queue_id/next" do { :get => "/queues/regular_queue/next" }.should route_to( :controller => "queue_items", :action => "next", :queue_id => "regular_queue", :format => "json" ) assigns(:queue).should_not be_nil expect(response).to be_success end But it is not at all coming inside my next action in controller. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e4fceb598e27968b4515aeacb1c1a9e9%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.