Sha256: 8e637f375ab47271f789320abc4c80976aa79eedf98407eb10dd7cda36113334

Contents?: true

Size: 754 Bytes

Versions: 13

Compression:

Stored size: 754 Bytes

Contents

require 'spec_helper'

describe Appsignal::ToAppsignalHash do
  subject { notification_event }

  it { should be_instance_of ActiveSupport::Notifications::Event }
  it { should respond_to(:to_appsignal_hash) }

  describe "#to_appsignal_hash" do
    subject { notification_event.to_appsignal_hash }

    it { should == {
      :time => 978364860.0,
      :duration => be_within(0.01).of(100.0),
      :end => 978364860.1,
      :name => "process_action.action_controller",
      :payload => {
        :path=>"/blog",
        :action=>"show",
        :controller=>"BlogPostsController",
        :request_format=>"html",
        :request_method=>"GET",
        :status=>"200",
        :view_runtime=>500,
        :db_runtime=>500
      }
    } }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
appsignal-0.6.7 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.6 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.5 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.4 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.3 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.3.beta.3 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.3.beta.2 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.3.beta.1 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.2 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.1 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.0.beta.2 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.6.0.beta.1 spec/appsignal/to_appsignal_hash_spec.rb
appsignal-0.5.5 spec/appsignal/to_appsignal_hash_spec.rb