Sha256: 67c2c30bd34d666bfac8cd8d9079a5867c05d897e11b0807196d5aaab61c81f7

Contents?: true

Size: 701 Bytes

Versions: 2

Compression:

Stored size: 701 Bytes

Contents

require 'spec_helper'
require ::File.expand_path("../../../lib/cornucopia/util/report_table", File.dirname(__FILE__))

describe Cornucopia::Util::ReportTable::ReportTableException do
  let(:inner_error) { Exception.new("This is an error") }
  let(:subject) { Cornucopia::Util::ReportTable::ReportTableException.new(inner_error) }

  it "returns the #error" do
    expect(subject.error.to_s).to be == "This is an error"
  end

  it "passes the backtrace to the inner error" do
    expect(inner_error).to receive(:backtrace).and_call_original
    subject.backtrace
  end

  it "passes the to_s to the inner error" do
    expect(inner_error).to receive(:to_s).and_call_original
    subject.to_s
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cornucopia-0.1.13 spec/lib/util/report_table_exception_spec.rb
cornucopia-0.1.12 spec/lib/util/report_table_exception_spec.rb