File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 before :each do
1414 JRuby ::Rack . context = nil
1515 $servlet_context = @servlet_context
16- allow ( @servlet_context ) . to receive ( :init_parameter_names ) . and_return [ ]
16+ allow ( @servlet_context ) . to receive ( :config ) . and_return Java :: OrgJrubyRackEmbed :: Config . new
1717 end
1818
1919 it "captures environment information" do
2020 expect ( @servlet_context ) . to receive ( :log )
21- error = StandardError . new
21+ error = StandardError . new "simulated rack start-up failed"
2222 error . capture
2323 error . store
2424 expect ( error . output ) . to be_a StringIO
25+ expect ( error . output . string ) . to include "An exception happened during JRuby-Rack startup"
26+ expect ( error . output . string ) . to include "simulated rack start-up failed"
27+ expect ( error . output . string ) . to include "--- System"
28+ expect ( error . output . string ) . to include "jruby #{ JRUBY_VERSION } "
29+ expect ( error . output . string ) . to include "--- Context Init Parameters:"
30+ expect ( error . output . string ) . to include "--- RubyGems"
31+ expect ( error . output . string ) . to include "Gem.path:"
32+ expect ( error . output . string ) . to include "--- Bundler"
33+ expect ( error . output . string ) . to include "Gemfile:"
34+ expect ( error . output . string ) . to include "--- JRuby-Rack Config"
35+ expect ( error . output . string ) . to include "logger_class_name"
2536 end
2637
2738 it "captures exception backtrace" do
3445 end
3546 end
3647
48+
3749end
You can’t perform that action at this time.
0 commit comments