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.
|