1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/test/commands
John Hawthorn 79953c476c 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) </dev/null |& cat
2019-08-14 10:52:21 -07:00
..
console_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
credentials_test.rb Revise flow to what was described in 03e44f9 2019-08-04 02:19:55 +02:00
db_system_change_test.rb
dbconsole_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
dev_test.rb
encrypted_test.rb
initializers_test.rb Add -e/--environment option to rails initializers 2019-03-16 10:02:06 +09:00
notes_test.rb Adds register_tags 2019-04-12 08:55:42 +02:00
routes_test.rb Allow tests to run without a TTY 2019-08-14 10:52:21 -07:00
secrets_test.rb
server_test.rb Allow using env var to specify pidfile 2019-06-19 14:06:38 +01:00