Sha256: c9e64e62a4a389e0302289e4ff54772ecea6349f27171cc873a95d1e6329cd9f

Contents?: true

Size: 728 Bytes

Versions: 6

Compression:

Stored size: 728 Bytes

Contents

require "minitest_helper"
require File.expand_path(File.dirname(__FILE__) + '/apps/sinatra_simple')

describe Sinatra do
  before do
    clear_all_traces
  end

  it "should trace a request to a simple sinatra stack" do
    @app = SinatraSimple

    r = get "/render"

    traces = get_all_traces
    traces.count.must_equal 8

    validate_outer_layers(traces, 'rack')

    traces[1]['Layer'].must_equal "sinatra"
    traces[3]['Label'].must_equal "profile_entry"
    traces[6]['Controller'].must_equal "SinatraSimple"
    traces[7]['Label'].must_equal "exit"

    # Validate the existence of the response header
    r.headers.key?('X-Trace').must_equal true
    r.headers['X-Trace'].must_equal traces[7]['X-Trace']
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
oboe-2.7.11.1 test/frameworks/sinatra_test.rb
oboe-2.7.11.1-java test/frameworks/sinatra_test.rb
oboe-2.7.10.1-java test/frameworks/sinatra_test.rb
oboe-2.7.10.1 test/frameworks/sinatra_test.rb
oboe-2.7.9.6-java test/frameworks/sinatra_test.rb
oboe-2.7.9.6 test/frameworks/sinatra_test.rb