Jump to content

The ultimate community for Ruby on Rails developers.


Writing Test cases for controllers


  • Please log in to reply
No replies to this topic

#1 praveen



  • Members
  • 1 posts

Posted 13 March 2014 - 07:22 AM

Hello All,

              How can i test controllers using rspec.


I'm having devise controller, posts and comments model their relationship will be:


user has many posts and posts has many comments

in every controller i user before_filter for authenticate user:


So how can i test weather user logged in or not , how to post any message with current user and how to test the comments

Also tagged with one or more of these keywords: rspec

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users