Sha256: 2417f58c102c7ccbef9fd24fba5042b7fbf948490e74a3fce980bd6cdd67897a

Contents?: true

Size: 808 Bytes

Versions: 31

Compression:

Stored size: 808 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

    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::SinatraInstrumentation, [], nil]
      )
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
appsignal-0.12.beta.31 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.30 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.29 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.28 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.27 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.26 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.25 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.24 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.23 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.22 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.21 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.20 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.19 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.18 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.17 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.16 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.15 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.14 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.13 spec/lib/appsignal/integrations/sinatra_spec.rb
appsignal-0.12.beta.12 spec/lib/appsignal/integrations/sinatra_spec.rb