Sha256: 693c5dc210474cebcabff48b1895aa9d2d98b06d80afb61cc8490cc2101e638e
Contents?: true
Size: 971 Bytes
Versions: 40
Compression:
Stored size: 971 Bytes
Contents
# Copyright (c) 2015 AppNeta, Inc. # All rights reserved. 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 9 valid_edges?(traces).must_equal true validate_outer_layers(traces, 'rack') traces[2]['Layer'].must_equal "sinatra" traces[4]['Label'].must_equal "profile_entry" traces[7]['Controller'].must_equal "SinatraSimple" traces[8]['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[8]['X-Trace'] end it "should have RUM code in the response" do @app = SinatraSimple r = get "/render" (r.body =~ /tly.js/).wont_equal nil end end
Version data entries
40 entries across 40 versions & 1 rubygems