Closed shaynekang closed 9 years ago
이 코멘트에서도 잠시 이야기했지만, 모델의 데이터 검증(Validation) 체크는 not_to raise_error보다 to be_valid가 더 간결하고 좋습니다.
not_to raise_error
to be_valid
it "should update when inputted TO is greater than the number of responsed go" do @to_notice.to = 2 expect { @to_notice.save! }.not_to raise_error end
는 다음과 같이 고칠 수 있겠죠.
it "should update when inputted TO is greater than the number of responsed go" do @to_notice.to = 2 expect(@to_notice).to be_valid end
다른 코드들도 동일하게 수정하면 좋겠습니다. ㅎㅎ
이 코멘트에서도 잠시 이야기했지만, 모델의 데이터 검증(Validation) 체크는
not_to raise_error
보다to be_valid
가 더 간결하고 좋습니다.는 다음과 같이 고칠 수 있겠죠.
다른 코드들도 동일하게 수정하면 좋겠습니다. ㅎㅎ