Don't wrap exceptions in test mode unless specifically requested.

This helps debugging reports with invalid SQL, which would otherwise
return no results instead of a useful error message while running
tests.
This commit is contained in:
Robin Ward
2019-02-08 11:25:32 -05:00
parent 7c55de6e6f
commit 72b5ab0454
2 changed files with 8 additions and 2 deletions

View File

@ -814,7 +814,7 @@ describe Report do
end
it "returns a report with an exception error" do
report = Report.find("exception_test")
report = Report.find("exception_test", wrap_exceptions_in_test: true)
expect(report.error).to eq(:exception)
end
end
@ -853,7 +853,7 @@ describe Report do
Report.stubs(:new).raises(ReportInitError.new("x"))
report = Report.find('signups')
report = Report.find('signups', wrap_exceptions_in_test: true)
expect(report).to be_nil