2011-04-15 94 views
1

我是Rails的新手,並且無法理解某些結構。RSpec方法問題

我下面的Rails Tutorial,看到類似下面的代碼:

require 'spec_helper' 

describe "Users" do 

    describe "signup" do 

    describe "failure" do 

     it "should not make a new user" do 
     visit signup_path 
     fill_in "Name",   :with => "" 
     fill_in "Email",  :with => "" 
     fill_in "Password",  :with => "" 
     fill_in "Confirmation", :with => "" 
     click_button 
     response.should render_template('users/new') 
     response.should have_selector("div#error_explanation") 
     end 
    end 
    end 
end 

我想現在做類似的測試,但我不知道從哪裏開始。我試圖在互聯網上查找「訪問」方法的文檔,但沒有成功。它是Rails測試套件的一部分嗎? RSpec的?我將如何去回答這個問題,以及對集成測試有很好的理解?有沒有可以使用的徹底教程?

+0

看起來像是在Webrat?太多事情一次發生。是否有任何「綜合」教程集成測試? – skaz 2011-04-15 16:06:05

回答