Skip to content

Commit 490db95

Browse files
committedJun 12, 2024·
Debug source cache
1 parent 2e8dfaa commit 490db95

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎Rakefile

-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ Rake::TestTask.new do |t|
3030

3131
# After 2.7, there were not warnings for uninitialized ivars anymore
3232
if RUBY_VERSION < "3"
33-
puts "Disabling warnings on Ruby #{RUBY_VERSION.inspect}"
3433
t.warning = false
35-
else
36-
puts "Enabling warnings on Ruby #{RUBY_VERSION.inspect}"
3734
end
3835
end
3936

‎spec/graphql/dataloader/source_spec.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ def fetch(keys)
2424

2525
source_cache = dl.instance_variable_get(:@source_cache)
2626
source_cache_for_source = source_cache[FailsToLoadSource]
27-
assert source_cache_for_source[[{}]].pending?, "The cache includes a pending source (#{source_cache_for_source.inspect})"
27+
source_inst = source_cache_for_source[[{}]]
28+
assert_instance_of FailsToLoadSource, source_inst, "The cache includes a pending source (#{source_cache_for_source.inspect})"
29+
assert source_inst.pending?
2830
end
2931

3032
class CustomKeySource < GraphQL::Dataloader::Source

0 commit comments

Comments
 (0)
Please sign in to comment.