Remove the stub_stdout
wrapper around CLI specs (#28340)
This commit is contained in:
parent
3a59365e40
commit
8a3d8c6c14
5 changed files with 110 additions and 58 deletions
|
@ -104,7 +104,6 @@ RSpec.configure do |config|
|
|||
end
|
||||
|
||||
config.before :each, type: :cli do
|
||||
stub_stdout
|
||||
stub_reset_connection_pools
|
||||
end
|
||||
|
||||
|
@ -163,14 +162,6 @@ def attachment_fixture(name)
|
|||
Rails.root.join('spec', 'fixtures', 'files', name).open
|
||||
end
|
||||
|
||||
def stub_stdout
|
||||
# TODO: Is there a bettery way to:
|
||||
# - Avoid CLI command output being printed out
|
||||
# - Allow rspec to assert things against STDOUT
|
||||
# - Avoid disabling stdout for other desirable output (deprecation warnings, for example)
|
||||
allow($stdout).to receive(:write)
|
||||
end
|
||||
|
||||
def stub_reset_connection_pools
|
||||
# TODO: Is there a better way to correctly run specs without stubbing this?
|
||||
# (Avoids reset_connection_pools! in test env)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue