2011-12-27 8 views
1

rspecテストでjavascriptを無効にしたい。RSpecTestのJavaScriptを無効にする

it '[SP01/UC18/TC25] title error for 31 letters' do 

    #=> Disable javascript (because text box is already validated by JS to max input 30  characters) 
    fill_in('title', :with => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA') 
    #=> Enable javascript (because I want to track the error messages) 
    click_button 'submit' 
    page.should have_content 'error in title' 
    page.should have_content 'please enter less than 30 characters' 

end 

答えて

1

ここでは

describe '[SP01/UC25] title error for 31 letters', :js => false, :type => :request do 
end 
+0

が、これは誰かに役立ちます願って答えです – Razz

関連する問題