Sha256: ef96f98ff2b18904f10305493f9dc2bed8507a6a019bd46133fd9c933a8dfde4

Contents?: true

Size: 577 Bytes

Versions: 7

Compression:

Stored size: 577 Bytes

Contents

require "spec_helper"

describe Timber::Events::Exception, :rails_23 => true do
  describe ".initialize" do
    it "should clean the backtrace" do
      backtrace = [
        "/path/to/file1.rb:26:in `function1'",
        "path/to/file2.rb:86:in `function2'"
      ]

      exception_event = described_class.new(name: "RuntimeError", exception_message: "Boom", backtrace: backtrace)
      expect(exception_event.backtrace).to eq([{:file=>"/path/to/file1.rb", :line=>26, :function=>"function1"}, {:file=>"path/to/file2.rb", :line=>86, :function=>"function2"}])
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
timber-2.1.0 spec/timber/events/exception_spec.rb
timber-2.1.0.rc6 spec/timber/events/exception_spec.rb
timber-2.1.0.rc5 spec/timber/events/exception_spec.rb
timber-2.1.0.rc4 spec/timber/events/exception_spec.rb
timber-2.1.0.rc3 spec/timber/events/exception_spec.rb
timber-2.1.0.rc2 spec/timber/events/exception_spec.rb
timber-2.1.0.rc1 spec/timber/events/exception_spec.rb