Sha256: 822d7a0fadd2d7148630c67a97d3277e8185d8de9d45a9433b06ca51145eb930

Contents?: true

Size: 1.23 KB

Versions: 47

Compression:

Stored size: 1.23 KB

Contents

require 'spec_helper'

if rails_present?
  describe Appsignal::Integrations::Railtie do
    context "after initializing the app" do
      before :all do
        MyApp::Application.config.root = project_fixture_path
        MyApp::Application.initialize!
      end

      context "logger" do
        subject { Appsignal.logger }

        it { should be_a Logger }
      end

      context "config" do
        subject { Appsignal.config }

        it { should be_a(Appsignal::Config) }

        its(:root_path) { should == Pathname.new(project_fixture_path) }
        its(:env) { should == 'test' }
        its([:name]) { should == 'TestApp' }

        context "initial config" do
          subject { Appsignal.config.initial_config }

          its([:name]) { should == 'MyApp' }
        end
      end

      context "agent" do
        subject { Appsignal.agent }

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

      it "should have added the listener middleware" do
        MyApp::Application.middleware.to_a.should include Appsignal::Rack::Listener
      end

      it "should not have added the instrumentation middleware" do
        MyApp::Application.middleware.to_a.should_not include Appsignal::Rack::Instrumentation
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
appsignal-0.11.7 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.7.beta.1 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.6 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.6.beta.0 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.5 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.4 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.4.beta.0 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.3 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.2 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.1 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.0 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.0.beta.2 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.11.0.beta.1 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.10.6 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.10.5 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.10.4 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.10.3 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.10.2 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.10.1 spec/lib/appsignal/integrations/rails_spec.rb
appsignal-0.10.0 spec/lib/appsignal/integrations/rails_spec.rb