spec/lita/robot_spec.rb in lita-4.7.1 vs spec/lita/robot_spec.rb in lita-4.8.0.beta1
- old
+ new
@@ -75,9 +75,18 @@
end
describe "#run" do
let(:thread) { instance_double("Thread", :abort_on_exception= => true, join: nil) }
+ # For some reason RSpec is no longer capturing tracebacks to
+ # stderr, so we do it manually to avoid cluttering the test output.
+ around do |example|
+ stderr = $stderr
+ $stderr = StringIO.new
+ example.run
+ $stderr = stderr
+ end
+
before do
allow_any_instance_of(Lita::Adapters::Shell).to receive(:run)
allow_any_instance_of(Puma::Server).to receive(:run)
allow_any_instance_of(Puma::Server).to receive(:add_tcp_listener)