을 params` 나는 나는 아래의 코드를 실행하려고 할 때 그러나 작업을해야 다음 컨트롤러 RSpec에 시험이 : 나는 다음과 같은 출력을 얻고 그러나정의되지 않은 지역 변수 또는 방법은`RSpec에
require 'spec_helper'
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe UsersController do
include Devise::TestHelpers #Include devise test helpers
render_views # Render devise views
describe "GET 'show'"
before(:each) do
@user = User.find(params[:id])
@attr = {:initials => 'EU', :name => 'Example', :full_name => 'Example User',
:email => '[email protected]', :password => 'password', :password_confirmation => 'password'
#@attr = User.all
}
end
it 'should be successful when showing OWN details' do
get :show, :id => @attr
response.should be_success
end
it 'should find the correct user' do
get :show, :id => @attr
assigns(@attr).should == @attr
end
end
: Undefined locacl variable or method 'params' for RSPRC
내가 생각을 이 설정은 정확해야합니다.
는 스택 추적입니다. 문제가있는 코드 줄은 무엇입니까? http://i.imgur.com/xdY0JF4.png –
@WayneConrad 나는 다음과 같은 출력을 얻을 메시지는 말합니다 : 11 번 줄에 오류가 있습니다. 추측 컨대 : 각각은 cuplprit입니다. –