Sha256: 19d0d358c8515b4244dc78ed7a9b3a05442781be4baed6437ccb799e27e66cc2

Contents?: true

Size: 867 Bytes

Versions: 40

Compression:

Stored size: 867 Bytes

Contents

# Copyright (c) 2015 AppNeta, Inc.
# All rights reserved.

require "minitest_helper"

if RUBY_VERSION >= '1.9.3' and defined?(::Padrino)
  require File.expand_path(File.dirname(__FILE__) + '/apps/padrino_simple')

  describe Padrino do
    before do
      clear_all_traces
    end

    it "should trace a request to a simple padrino stack" do
      @app = SimpleDemo

      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 "padrino"
      traces[7]['Controller'].must_equal "SimpleDemo"
      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
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
traceview-3.8.3-java test/frameworks/padrino_test.rb
traceview-3.8.3 test/frameworks/padrino_test.rb
traceview-3.8.2-java test/frameworks/padrino_test.rb
traceview-3.8.2 test/frameworks/padrino_test.rb
traceview-3.8.1-java test/frameworks/padrino_test.rb
traceview-3.8.1 test/frameworks/padrino_test.rb
traceview-3.8.0-java test/frameworks/padrino_test.rb
traceview-3.8.0 test/frameworks/padrino_test.rb
traceview-3.7.1-java test/frameworks/padrino_test.rb
traceview-3.7.1 test/frameworks/padrino_test.rb
traceview-3.7.0-java test/frameworks/padrino_test.rb
traceview-3.7.0 test/frameworks/padrino_test.rb
traceview-3.6.0-java test/frameworks/padrino_test.rb
traceview-3.6.0 test/frameworks/padrino_test.rb
traceview-3.5.1-java test/frameworks/padrino_test.rb
traceview-3.5.1 test/frameworks/padrino_test.rb
traceview-3.5.0-java test/frameworks/padrino_test.rb
traceview-3.5.0 test/frameworks/padrino_test.rb
traceview-3.4.2-java test/frameworks/padrino_test.rb
traceview-3.4.2 test/frameworks/padrino_test.rb