Sha256: bb7006eda070a7c0643a3be809a7560f94f573e0f0fd9359492293a3b7c6b499
Contents?: true
Size: 671 Bytes
Versions: 1
Compression:
Stored size: 671 Bytes
Contents
require "spec_helper" describe Timber::Probes::Rack do describe described_class::Middleware do describe ".call" do let(:app) do Rack::Builder.new do use Timber::Probes::Rack::Middleware run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['hello world']] } end end let(:context_class) { Timber::Contexts::HTTPRequests::Rack } def request Rack::MockRequest.new(app).get('/') end it "should set the context" do expect(Timber::CurrentContext).to receive(:add).with(kind_of(context_class)).and_yield.once request end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
timberio-1.0.0.beta1 | spec/timber/probes/rack_spec.rb |