Closed Xanthus closed 3 years ago
@Xanthus Thanks for the bug report. Please share a minimal code example that fails with this error. I already have a possible fix in my mind, but want to make sure your case will be also fixed.
Possible fix I'll check later:
diff --git a/lib/turbo_tests.rb b/lib/turbo_tests.rb
index ade2335..8621d46 100644
--- a/lib/turbo_tests.rb
+++ b/lib/turbo_tests.rb
@@ -36,7 +36,7 @@ module TurboTests
end
end
- FakeExecutionResult = Struct.new(:example_skipped?, :pending_message, :status, :pending_fixed?, :exception)
+ FakeExecutionResult = Struct.new(:example_skipped?, :pending_message, :status, :pending_fixed?, :exception, :pending_exception)
class FakeExecutionResult
def self.from_obj(obj)
new(
@@ -44,6 +44,7 @@ module TurboTests
obj["pending_message"],
obj["status"].to_sym,
obj["pending_fixed?"],
+ FakeException.from_obj(obj["exception"]),
FakeException.from_obj(obj["exception"])
)
end
I'm also having this error.
@wwahammy Please share a minimal code example that fails with this error.
Any pending
example from RSpec will trigger the problem: https://relishapp.com/rspec/rspec-core/v/3-10/docs/pending-and-skipped-examples/pending-examples. This will fail:
describe "an example" do
it "is implemented but waiting" do
pending("something else getting finished")
raise
end
end
Thank you for tracking it down @louim. This is been on my unending to-do list :+1:
@ilyazub: I tried your fix, but it gets stuck later on:
/Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:272:in `exception_backtrace': undefined method `backtrace' for nil:NilClass (NoMethodError)
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:245:in `find_failed_line'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:218:in `read_failed_lines'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:166:in `failure_slash_error_lines'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:153:in `block in failure_lines'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:152:in `tap'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:152:in `failure_lines'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:34:in `colorized_message_lines'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:253:in `formatted_message_and_backtrace'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:88:in `fully_formatted_lines'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/exception_presenter.rb:80:in `fully_formatted'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/notifications.rb:200:in `fully_formatted'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/notifications.rb:126:in `block in fully_formatted_pending_examples'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/notifications.rb:125:in `each'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/notifications.rb:125:in `each_with_index'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/notifications.rb:125:in `fully_formatted_pending_examples'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/base_text_formatter.rb:49:in `dump_pending'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/lib/turbo_tests/reporter.rb:121:in `block in delegate_to_formatters'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/lib/turbo_tests/reporter.rb:120:in `each'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/lib/turbo_tests/reporter.rb:120:in `delegate_to_formatters'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/lib/turbo_tests/reporter.rb:96:in `finish'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/lib/turbo_tests/runner.rb:92:in `run'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/lib/turbo_tests/runner.rb:36:in `run'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/lib/turbo_tests/cli.rb:89:in `run'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/bin/turbo_tests:11:in `<top (required)>'
from /Users/louim/.asdf/installs/ruby/2.6.8/bin/turbo_tests:23:in `load'
from /Users/louim/.asdf/installs/ruby/2.6.8/bin/turbo_tests:23:in `<top (required)>'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/cli/exec.rb:63:in `load'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/cli/exec.rb:28:in `run'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/cli.rb:481:in `exec'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/cli.rb:31:in `dispatch'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/cli.rb:25:in `start'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/exe/bundle:49:in `block in <top (required)>'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.25/exe/bundle:37:in `<top (required)>'
from /Users/louim/.asdf/installs/ruby/2.6.8/bin/bundle:23:in `load'
from /Users/louim/.asdf/installs/ruby/2.6.8/bin/bundle:23:in `<main>'
I have not dug down further.
@louim I found a problem and preparing the solution. Thank you for the minimal reproducible example :rocket:
PR with a fix: #15. Feel free to test and review it.
Cool project, thought I'd give it a try. Getting the following error below. I'm not sure which spec line is producing the error as I haven't spent time digging. If you want me to try something to figure it out let me know.
Extract from Gemfile.lock:
Exception: