Sha256: e770bc28acc5a77b624ae4ff62d5f4406996429fbbdc4f26d693d847e9f41de3
Contents?: true
Size: 797 Bytes
Versions: 1
Compression:
Stored size: 797 Bytes
Contents
require "spec_helper" describe Timber::Contexts::Exception do let(:exception) do begin raise StandardError.new("this is a message") rescue Exception => e e end end let(:context) { described_class.new(exception) } describe ".as_json" do subject { context.as_json } its([:exception, :backtrace]) { should_not be_nil } its([:exception, :name]) { should eq("StandardError") } its([:exception, :message]) { should eq("this is a message") } end describe ".backtrace" do subject { context.backtrace } its(:size) { should eq(5) } end describe ".name" do subject { context.name } it { should eq("StandardError") } end describe ".message" do subject { context.message } it { should eq("this is a message") } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
timberio-1.0.0.beta1 | spec/timber/contexts/exception_spec.rb |