Hi,

On Mon, Mar 7, 2011 at 15:30, DBA <diogo.borges.alme...@gmail.com> wrote:
> I was just starting a rails 3.0.5 application with rspec-rails 2.5.0
> and ruby 1.9.2-p180 and when I went to describe my controller I ran
> into this undefined method 'get' error.
>
> Here's the spec that is causing the problem (which lives in the folder
> spec/controllers)
>
> require 'spec_helper'
>
> describe ArticlesController, :type => :controller do
>  describe "GET index" do
>    get :index
>    response.should be_successful
>  end
> end

Not sure what the problem could be. Does ArticlesController inherit
from ActionController::Base (maybe via ApplicationController)? You
shouldn't need to specify :type => :controller on the top-level
describe like you do. Also, your expectation should be
'response.should be_success'.

Mike
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to