serpapi / turbo_tests

Run RSpec tests on multiple cores. Like parallel_tests but with incremental summarized output. Originally extracted from the Discourse and Rubygems source code.
https://rubygems.org/gems/turbo_tests
MIT License
173 stars 26 forks source link

`turbo_tests` output missed one error compared and failed lines (compared to RSpec output) #40

Closed ilyazub closed 4 months ago

ilyazub commented 1 year ago

turbo_tests output missed one error compared and failed lines (compared to RSpec output). It could be related to the aggregate_failures option.

RSpec output

RSpec listed the failed spec, NoMethodError, and pointed on the file name and line number.

Failures:

  1) Google Organic Results API Organic Results for Coffee First Wikipedia result has inline sitelinks
     Got 1 failure and 1 other error:

     1.1) Failure/Error: @result["sitelinks"].should be_a(Hash)
            expected nil to be a kind of Hash

          # ./spec/search/google/organic_results/organic_results_coffee_spec.rb:328:in `block (4 levels) in <main>'

     1.2) Failure/Error: @result["sitelinks"]["inline"].should be_a(Array)

          NoMethodError:
            undefined method `[]' for nil:NilClass

          # ./spec/search/google/organic_results/organic_results_coffee_spec.rb:329:in `block (4 levels) in <main>'

Finished in 5.49 seconds (files took 4.36 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/search/google/organic_results/organic_results_coffee_spec.rb:327 # Google Organic Results API Organic Results for Coffee First Wikipedia result has inline sitelinks

turbo_tests output

turbo_tests output contained only the error messages.

Failures:

  1) Google Organic Results API Organic Results for Coffee First Wikipedia result has inline sitelinks                                                                       
     Failure/Error: Unable to find matching line from backtrace

       expected nil to be a kind of Hash

       undefined method `[]' for nil:NilClass

Finished in 18.97 seconds (files took 3.88 seconds to load)
185 examples, 1 failure

Failed examples:

rspec ./spec/search/google/organic_results/organic_results_coffee_spec.rb:327 # Google Organic Results API Organic Results for Coffee First Wikipedia result has inline sitelinks

Code

it "has inline sitelinks" do
  @result["sitelinks"].should be_a(Hash)
  @result["sitelinks"]["inline"].should be_a(Array)
end