권장 레일북 (agile-web-development-with-rails-4_p2_0.pdf)을 읽고 있는데 아래 코드에 대한 간단한 질문이 있습니다.레일 4 컨트롤러 테스트 - get : index에서 html을 선택하는 방법은 무엇입니까?
class StoreControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_select '#columns #side a', minimum: 4
assert_select '#main .entry', 3
assert_select 'h3', 'Programming Ruby 1.9'
assert_select '.price', /\$[,\d]+\.\d\d/
end
end
주장의 노하우가 매개 변수로 해당 데이터를 사용하여 어떻게 get :index
방법을 판매? ActionController :: TestCase의 뒤에서 어떤 종류의 마법이 발생합니까? 내부적으로