vscode-ruby-test-adapter icon indicating copy to clipboard operation
vscode-ruby-test-adapter copied to clipboard

Output pane does not show the complete error log from bundle exec rspec

Open ADTC opened this issue 4 years ago • 1 comments

Your environment

  • vscode-ruby-test-adapter version: 0.9.0
  • Ruby version: 2.5.1p57
  • VS Code version: 1.56.2 (connected to WSL: Ubuntu)
  • Operating System: Ubuntu 20.04.2 LTS on WSL2 (Windows 10)
  • RSpec or Minitest version: RSpec 3.10

Steps to Reproduce

  1. Install the extension in VS Code.
  2. Load a Ruby project with RSpec which doesn't have the test database.
  3. Click "View error message" on the following notification message. image "Ruby Test Explorer failed to find an RSpec test suite. Make sure RSpec is installed and your configured RSpec command is correct."

Expected behavior

The full error log must be shown in the Output pane.

Actual behavior

image

Only the message "No examples found." is shown in the Output pane. When running bundle exec rspec spec in terminal, the following log output is produced:

$ bundle exec rspec spec
An error occurred while loading rails_helper.
Failure/Error: ActiveRecord::Migration.maintain_test_schema!

ActiveRecord::NoDatabaseError:
  FATAL:  database "my_test_db" does not exist
# ./spec/rails_helper.rb:29:in `<top (required)>'
# ------------------
# --- Caused by: ---
# PG::ConnectionBad:
#   FATAL:  database "my_test_db" does not exist
#   ./spec/rails_helper.rb:29:in `<top (required)>'
No examples found.
No examples found.
 0/0 |====================================================== 100 ======================================================>| Time: 00:00:00


Finished in 0.00103 seconds (files took 6.71 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

Finished in 0.00103 seconds (files took 6.71 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

Coverage report generated for RSpec to ./coverage. 736 / 29444 LOC (2.5%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected

ADTC avatar Jul 16 '21 13:07 ADTC

I'm running into this exact problem also. I'm finding that the test explorer, while fast is simply not verbose enough to be useful.

chozandrias76 avatar Feb 02 '22 18:02 chozandrias76