내가 기능/시나리오 RSpec에 악기를 통해 계산 테스트 모델에 문제가RSpec에 통합 테스트
require 'spec_helper'
feature 'Registration' do
scenario 'Guest can sign up as individual' do
with_role(:guest)
sign_up(:client)
Individual.count.should == 1
# should be replaced by expect{ sign_up(:client) }.to change{ Individual.count }.by(1)
end
end
가 어떻게 시나리오에서 기대에 블록 기대에 model.count 정상적으로 대체 할 수있다? 레코드 개수가 때마다 변경의 내가
안부, 알렉스를 사용하기 때문에 사용하지 않을해야
너는 무엇을 요구하고 있니? 그 '기대하다'는 무엇이 잘못 되었습니까? – phoet
왜 전화를 걸어서 전화 번호를 변경해야합니까? – usha
소리가 나지 않는다. – asiniy