Sha256: b9e461dd24215faedad8ebe0c333a984b3f0a468dede6ec2f7da60f49419b7c2

Contents?: true

Size: 510 Bytes

Versions: 18

Compression:

Stored size: 510 Bytes

Contents

require "spec_helper"

describe Logtail::Events::Error do
  describe "#to_hash" do
    it "should jsonify the stacktrace" do
      backtrace = [
        "/path/to/file1.rb:26:in `function1'",
        "path/to/file2.rb:86:in `function2'"
      ]

      exception_event = described_class.new(name: "RuntimeError", error_message: "Boom", backtrace: backtrace)
      expect(exception_event.backtrace_json).to eq("[\"/path/to/file1.rb:26:in `function1'\",\"path/to/file2.rb:86:in `function2'\"]")
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
logtail-ruby-0.1.3 spec/logtail/events/error_spec.rb
logtail-0.1.13 spec/logtail/events/error_spec.rb
logtail-0.1.12 spec/logtail/events/error_spec.rb
logtail-0.1.11 spec/logtail/events/error_spec.rb
logtail-0.1.10 spec/logtail/events/error_spec.rb
logtail-0.1.9 spec/logtail/events/error_spec.rb
logtail-0.1.8 spec/logtail/events/error_spec.rb
logtail-0.1.7 spec/logtail/events/error_spec.rb
logtail-0.1.6 spec/logtail/events/error_spec.rb
logtail-0.1.5 spec/logtail/events/error_spec.rb
logtail-0.1.4 spec/logtail/events/error_spec.rb
logtail-0.1.3 spec/logtail/events/error_spec.rb
logtail-0.1.2 spec/logtail/events/error_spec.rb
logtail-0.1.1 spec/logtail/events/error_spec.rb
logtail-0.1.0 spec/logtail/events/error_spec.rb
logtail-ruby-0.1.2 spec/logtail/events/error_spec.rb
logtail-ruby-0.1.1 spec/logtail/events/error_spec.rb
logtail-ruby-0.1.0 spec/logtail/events/error_spec.rb