We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8dd2ae commit cc0a3beCopy full SHA for cc0a3be
spec/lib/kanban_metrics/linear/cache_spec.rb
@@ -354,9 +354,10 @@
354
it 'handles file permission errors gracefully' do
355
# Arrange
356
cache.set(cache_key, test_data)
357
+ file_manager = cache.instance_variable_get(:@file_manager)
358
- # Stub the CacheFileManager's read_file method to raise a permission error
359
- allow_any_instance_of(KanbanMetrics::Linear::CacheFileManager)
+ # Stub the specific file manager instance's read_file method to raise a permission error
360
+ allow(file_manager)
361
.to receive(:read_file)
362
.with(cache_key)
363
.and_raise(Errno::EACCES, 'Permission denied')
0 commit comments