diff options
Diffstat (limited to 'spec/bundler/fetcher/compact_index_spec.rb')
-rw-r--r-- | spec/bundler/fetcher/compact_index_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/bundler/fetcher/compact_index_spec.rb b/spec/bundler/fetcher/compact_index_spec.rb index 5a2d22193a..2f622f6653 100644 --- a/spec/bundler/fetcher/compact_index_spec.rb +++ b/spec/bundler/fetcher/compact_index_spec.rb @@ -11,11 +11,14 @@ RSpec.describe Bundler::Fetcher::CompactIndex do end describe "#specs_for_names" do + let(:thread_list) { Thread.list.select {|thread| thread.status == "run" } } + let(:thread_inspection) { thread_list.map {|th| " * #{th}:\n #{th.backtrace_locations.join("\n ")}" }.join("\n") } + it "has only one thread open at the end of the run" do compact_index.specs_for_names(["lskdjf"]) - thread_count = Thread.list.count {|thread| thread.status == "run" } - expect(thread_count).to eq 1 + thread_count = thread_list.count + expect(thread_count).to eq(1), "Expected 1 active thread after `#specs_for_names`, but found #{thread_count}. In particular, found:\n#{thread_inspection}" end it "calls worker#stop during the run" do |