Sha256: 0f418c3aa82d47e02ba70526ed9ca7d9ecb3b5ea6c4172c66cba4ad426dd2efb

Contents?: true

Size: 708 Bytes

Versions: 2

Compression:

Stored size: 708 Bytes

Contents

# frozen_string_literal: true
require_relative 'performance_helper'
require_relative '../spec/spec_data'

RSpec.describe "Performance testing with a dummy class", performance: true do
  include RSpec::Benchmark::Matchers
  include_context 'spec_data'

  let(:app) { proc{ [200, {}, ['Hello, world.']] } }
  let(:stack) { RackRequestObjectLogger.new(app, RequestDummyLog) }
  let(:request) { Rack::MockRequest.new(stack) }

  let(:logger_object) { RequestDummyLog.new }
  before { allow(RequestDummyLog).to receive(:new).and_return(logger_object) }

  it 'much fast. wow' do
    set_headers(rails5_puma_headers)
    expect { request.get('http://localhost:4000/doge') }.to perform_at_least(5000).ips
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-request-object-logger-3.0.3 performance/in_memory_model_spec.rb
rack-request-object-logger-2.0.1 performance/in_memory_model_spec.rb