Skip to content
Snippets Groups Projects
Commit 0df65909 authored by Yorick Peterse's avatar Yorick Peterse
Browse files

Added benchmark for User.all

This benchmark exists to test if ordering has any noticeable impact in
the test environment.
parent 8f75200d
No related branches found
No related tags found
No related merge requests found
require 'spec_helper'
 
describe User, benchmark: true do
describe '.all' do
before do
10.times { create(:user) }
end
benchmark_subject { User.all.to_a }
it { is_expected.to iterate_per_second(500) }
end
describe '.by_login' do
before do
%w{Alice Bob Eve}.each do |name|
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment