Sha256: 4a76a099fe82ba398446d2453fa6879d2d6f9a293cdc02e476218934f67ff74a
Contents?: true
Size: 654 Bytes
Versions: 5
Compression:
Stored size: 654 Bytes
Contents
require "spec_helper" describe Timber::Events::Error, :rails_23 => true 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) expected_hash = { :name => "RuntimeError", :message => "Boom", :backtrace_json => "[\"/path/to/file1.rb:26:in `function1'\",\"path/to/file2.rb:86:in `function2'\"]" } expect(exception_event.to_hash).to eq(expected_hash) end end end
Version data entries
5 entries across 5 versions & 1 rubygems