Skip to content

Commit 643b3d2

Browse files
committed
Prevent the tempfile from being deleted before the specs run.
1 parent 857b6bf commit 643b3d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/shellcode_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@
3232
end
3333

3434
context "with :output" do
35-
let(:output) do
36-
Tempfile.new(['ronin-shellcode-custom-path', '.bin']).path
35+
let(:tempfile) do
36+
Tempfile.new(['ronin-shellcode-custom-path', '.bin'])
3737
end
38+
let(:output) { tempfile.path }
3839

3940
it "must write to the custom path" do
4041
expect(subject.assemble(output: output)).to eq(shellcode)

0 commit comments

Comments
 (0)