Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
具体来说,我想知道如何将单元测试和验收测试分开。
单元测试看起来像:
it 'creates bar' do expect { post '/foo/bar' }.to change{ Bar.count }.by 1 end
这是单元测试和验收测试的混合。但我不明白如何将它们分开。
APIapp/bar.rb文件:
app/bar.rb
post '/foo/bar' do Bar.create status 202 end
此外,任何相关链接表示赞赏。