Sha256: f618f4a086739cfc0267e3180cbf23bf5525c7ceb900b7b9bddf464ca86bf7de
Contents?: true
Size: 1.3 KB
Versions: 151
Compression:
Stored size: 1.3 KB
Contents
require 'spec_helper' if rails_present? require 'action_view' describe Appsignal::EventFormatter::ActionView::RenderFormatter do before { Rails.root.stub(:to_s => '/var/www/app/20130101') } let(:klass) { Appsignal::EventFormatter::ActionView::RenderFormatter } let(:formatter) { klass.new } it "should register render_partial.action_view and render_template.action_view" do Appsignal::EventFormatter.registered?('render_partial.action_view', klass).should be_true Appsignal::EventFormatter.registered?('render_template.action_view', klass).should be_true end describe "#root_path" do its(:root_path) { should == '/var/www/app/20130101/' } end describe "#format" do subject { formatter.format(payload) } context "with an identifier" do let(:payload) { {:identifier => '/var/www/app/20130101/app/views/home/index/html.erb'} } it { should == ['app/views/home/index/html.erb', nil] } end context "with a frozen identifier" do let(:payload) { {:identifier => '/var/www/app/20130101/app/views/home/index/html.erb'.freeze} } it { should == ['app/views/home/index/html.erb', nil] } end context "without an identifier" do let(:payload) { {} } it { should be_nil } end end end end
Version data entries
151 entries across 151 versions & 1 rubygems