debian-mirror-gitlab/spec/benchmarks/finders/trending_projects_finder_spec.rb
2015-10-24 18:46:33 +05:30

14 lines
395 B
Ruby

require 'spec_helper'
describe TrendingProjectsFinder, benchmark: true do
describe '#execute' do
let(:finder) { described_class.new }
let(:user) { create(:user) }
# to_a is used to force actually running the query (instead of just building
# it).
benchmark_subject { finder.execute(user).non_archived.to_a }
it { is_expected.to iterate_per_second(500) }
end
end