Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Open Source > RoR Ruby on Rails
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the RoR Ruby on Rails section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2008, 04:02 AM
Authorized User
 
Join Date: Jul 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default testing a controller using rspec



My controller action is

   class SimpleController < ApplicationController
      def index
         render status => 200, :text => 'test'
      end
   end

an the rspec test i did is

 describe "GET 'index'" do
    it "should be successful" do

      Administrator.status.should=200
    end
  end

 the error is undefined method status.



Please tell me what is the test to make sure it returns status 200.






Similar Threads
Thread Thread Starter Forum Replies Last Post
rspec framework Manoah RoR Ruby on Rails 0 September 18th, 2008 10:32 PM
PHP Controller cyber_kaley20 Beginning PHP 0 July 8th, 2007 10:12 PM
controller to controller tigransh Spring 1 November 11th, 2006 12:48 AM
throwaway controller mmasters BOOK: Professional Java Development with the Spring Framework 0 June 27th, 2006 10:56 AM
Model View Controller gpartin33324 Java GUI 0 October 4th, 2004 04:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.