Hi,

I have written some controller methods and testing it using Rspec. I am
just learning the Rspec by testing those methods. I need some hints on
how to do it. I have the below method in my QueueItemsController and I
need to test it. So how do I proceed. Please help. I read the tutorials
and other online forums but it seems to be confusing at some point.

     def next
         @receiver = @queue.pop()
         unless @receiver.nil?
           respond_with(@receiver)
         else
           render :json =>{"msg"=>"No more Items in the Queue to
retrieve..!!"}
         end
       end

--
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@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c6fac89b7c2cd816ea18363739cecad5%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedApr 29, '14 at 11:58a
activeApr 30, '14 at 6:42a
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Ruby rails: 1 post Frederick Cheung: 1 post

People

Translate

site design / logo © 2022 Grokbase