it 'allows a new user to sign up', :js do
Capybara.current_driver = :selenium
visit '/'
click_link 'Sign up'
old_count = User.all.size
within '#userModal' do
fill_in 'user[name]', with: 'some'
fill_in 'user[email]', with: 'some@test.com'
fill_in 'user[password]', with: '123123123'
fill_in 'user[password_confirmation]', with: '123123123'
d=find('input[type=submit]')
p d
p d.class
d.click
User.all.size.should == old_count + 1
end
end
这种方式有效,在删除驱动程序选择时失败。
使用硒我进入日志:
Started POST "/users" for 127.0.0.1 at 2013-10-29 00:51:36 -0500
Processing by Users::RegistrationsController#create as HTML
虽然 Webkit 不会发生这种情况。
我的问题是如何找到这种行为的原因?