connorshea / vscode-ruby-test-adapter

A Ruby test adapter extension for the VS Code Test Explorer
https://marketplace.visualstudio.com/items?itemName=connorshea.vscode-ruby-test-adapter
MIT License
83 stars 50 forks source link

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

Open ADTC opened 3 years ago

ADTC commented 3 years ago

Your environment

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
chozandrias76 commented 2 years ago

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.