Sha256: 7739bd1cb1d702e8106ce5d4099dda55c824cfc7c89dd5f490bc22a69bb74bad

Contents?: true

Size: 742 Bytes

Versions: 16

Compression:

Stored size: 742 Bytes

Contents

require 'spec_helper'

describe Appsignal::Middleware::ActionViewSanitizer do
  let(:klass) { Appsignal::Middleware::ActionViewSanitizer }
  let(:sanitizer) { klass.new }

  describe "#call" do
    before { Rails.root.stub(:to_s => '/var/www/app/20130101') }
    let(:event) do
      notification_event(
        :name => 'render_partial.action_view',
        :payload => create_payload(payload)
      )
    end
    let(:payload) do
      {
        :identifier => '/var/www/app/20130101/app/views/home/index/html.erb'
      }
    end
    subject { event.payload }
    before { sanitizer.call(event) { } }

    it "should strip Rails root from the path" do
      payload[:identifier].should == 'app/views/home/index/html.erb'
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
appsignal-0.6.7 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.6 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.5 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.4 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.3 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.3.beta.3 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.3.beta.2 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.3.beta.1 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.2 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.1 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.0.beta.2 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.6.0.beta.1 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.5.5 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.5.3 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.5.1 spec/appsignal/middleware/action_view_sanitizer_spec.rb
appsignal-0.5.0 spec/appsignal/middleware/action_view_sanitizer_spec.rb