[rspec-users] undefined method 'get'
mmazur at gmail.com
Sun Mar 13 09:46:10 EDT 2011
On Mon, Mar 7, 2011 at 15:30, DBA <diogo.borges.almeida at 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
> require 'spec_helper'
> describe ArticlesController, :type => :controller do
> describe "GET index" do
> get :index
> response.should be_successful
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
More information about the rspec-users