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