Forum: Ruby on Rails testing controllers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
rohit mehra (Guest)
on 2005-12-13 14:37
(Received via mailing list)
Hi all
  i m having a tough time testing my controllers,  some different cases:

  1)   def spCodes
        @sp_codes = Code.get_sp_code(params[:id], 0, 100)

  2)  def search
       @matcher = request.raw_post || request.query_string
       @code = Code.search(@matcher)

  i am getting nil objects for both of methods,
  can anybody help ...

  thanks
This topic is locked and can not be replied to.