我原以为这个测试会通过。任何想法为什么它不是?
it 'should create an account' do
visit new_user_registration_path
fill_in 'user_email', with: 'newtest@test.com'
fill_in 'user_password', with: 'testing123'
fill_in 'user_password_confirmation', with: 'testing123'
expect{
click_button 'Sign Up'
}.to change{User.count}.by(1)
end
我只是得到
result should have been changed by 1, but was changed by 0