字符串我有以下代碼來測試文件上傳: test 'when a user adds an attachment to an existing candidate, the attachment shows up on the candidates page' do
user = login_user
opportunity = opportunities(:with_candid
,如果這個問題已經回答了,請告訴我。我只能找到平常的「什麼是公共/私人/受保護」的問題! 因此,這裏是我的問題: 我什麼時候使用私有方法和做,當我創建的公共方法,而不是一個新的類? 實施例: class MyActualWorker {
public function work() {
$this->helperMethod1();
$this->helperMe
我試圖在我的Rails 4應用程序上測試驗證。問題在於添加一個特定的驗證所有測試通過,而不管剩餘的驗證是否被評論。這裏是我的代碼: # test/models/company_test.rb
setup do
@company = companies(:one)
@company2 = companies(:two)
end
test "should not save