From 79953c476c51ab407ab3e75b12e5f3d63b6a0a61 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Wed, 14 Aug 2019 10:39:55 -0700 Subject: [PATCH] Allow tests to run without a TTY We had two tests which assigned IO.console.winsize (to ensure output was consistent), however it's possible for IO.console to be nil. This commit makes these tests stub IO.console_size directly (the method we actually call, we shouldn't have been relying on that calling IO.console.winsize anyways) or passes the width when initializing the class. This allows tests to run without a TTY. This can be tested with ex. ssh localhost "cd src/rails/actionpack && bundle exec rake" or (setsid bundle exec rake)