Sha256: eca0beadda02eed6ff40c2baef2a0ddac433efe9567f0ce1665f8116c33e0b86
Contents?: true
Size: 702 Bytes
Versions: 26
Compression:
Stored size: 702 Bytes
Contents
require "rails_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
26 entries across 26 versions & 1 rubygems