字符串我有以下代码来测试文件上传: 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