サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
iPhone 16
www.wetestrails.com
When you need to test Rake tasks for a Rails app, its convenient to be able to write short, snappy specs like so: # File: spec/tasks/send_invoices_spec.rb require "rails_helper" describe "rake billing:send_invoices", type: :task do it "preloads the Rails environment" do expect(task.prerequisites).to include "environment" end it "runs gracefully with no subscribers" do expect { task.execute }.not_t
One way to speed up a slow test suite is to optimize how FactoryGirl is used, but where do you focus your efforts? Before tuning your factory usage, consider measuring which factories are adding the most time to your test runs. You may discover the time spent in factories is fine and decide to speed up another area of your suite. Introduce FactoryGirlProfiler below to an RSpec project. It will onl
このページを最初にブックマークしてみませんか?
『www.wetestrails.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く