Sha256: 73e6f6dfdfd26a61467340d474b91712d2c25289657338c32cbf03ed44a78455

Contents?: true

Size: 733 Bytes

Versions: 6

Compression:

Stored size: 733 Bytes

Contents

require "test_helper"

describe Pliny::Extensions::Instruments do
  def app
    Rack::Builder.new do
      run Sinatra.new {
        register Pliny::Extensions::Instruments

        get "/apps/:id" do
          status 201
          "hi"
        end
      }
    end
  end

  it "performs logging" do
    mock(Pliny).log(hash_including(
      instrumentation: true,
      at:              "start",
      method:          "GET",
      path:            "/apps/123",
    ))
    mock(Pliny).log(hash_including(
      instrumentation: true,
      at:              "finish",
      method:          "GET",
      path:            "/apps/123",
      route_signature: "/apps/:id",
      status:          201
    ))
    get "/apps/123"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pliny-0.0.4 test/extensions/instruments_test.rb
pliny-0.0.3 test/extensions/instruments_test.rb
pliny-0.0.1 test/extensions/instruments_test.rb
pliny-0.0.1.pre3 test/extensions/instruments_test.rb
pliny-0.0.1.pre2 test/extensions/instruments_test.rb
pliny-0.0.1.pre test/extensions/instruments_test.rb