Sha256: cf77ee1cd44478404454900576575179eef9073d1fc0cdc965faef312e937d6a

Contents?: true

Size: 911 Bytes

Versions: 63

Compression:

Stored size: 911 Bytes

Contents

require 'spec_helper'

begin
  require 'sinatra'
rescue LoadError
end

if defined?(::Sinatra)
  ENV['APPSIGNAL_PUSH_API_KEY'] = 'key'
  require 'appsignal/integrations/sinatra'

  describe "Sinatra integration" do
    context "logger" do
      subject { Appsignal.logger }

      it { should be_a Logger }
    end

    context "config" do
      subject { Appsignal.config }

      it { should be_a(Appsignal::Config) }
    end

    context "agent" do
      subject { Appsignal.agent }

      it { should be_a(Appsignal::Agent) }
    end

    it "should have added the listener middleware" do
      Sinatra::Application.middleware.to_a.should include(
        [Appsignal::Rack::Listener, [], nil]
      )
    end

    it "should have added the instrumentation middleware" do
      Sinatra::Application.middleware.to_a.should include(
        [Appsignal::Rack::Instrumentation, [], nil]
      )
    end
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
appsignal-0.8.4.beta.1 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.4.beta.0 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.3 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.3.beta.1 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.3.beta.0 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.2 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.1 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.1.beta.4 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.1.beta.3 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.1.beta.2 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.1.beta.1 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.1.beta.0 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.0 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.0.beta.1 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.0.beta.0 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.8.0.alpha.0 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.7.1 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.7.1.beta.1 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.7.0.beta.1 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.7.0.alpha.4 spec/lib/appsignal/integrations/sinatra_spec.rb