Skip to content

Commit a43a533

Browse files
dpepclaude
andcommitted
Restore original output_directory instead of nil
More robust and future-proof to restore the previous state rather than destroying it. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 57d6474 commit a43a533

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/spec_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919

2020
RSpec.configure do |config|
2121
config.around do |example|
22+
original_output_directory = Singed.output_directory
2223
Dir.mktmpdir("singed-spec") do |dir|
2324
Singed.output_directory = dir
2425
example.run
2526
end
2627
ensure
27-
Singed.output_directory = nil
28+
Singed.output_directory = original_output_directory
2829
end
2930
# rspec-expectations config goes here. You can use an alternate
3031
# assertion/expectation library such as wrong or the stdlib/minitest

0 commit comments

Comments
 (0)