Skip to content

Commit

Permalink
Fix possible open resource leak in AssetsPrecompile spec
Browse files Browse the repository at this point in the history
  • Loading branch information
robwise committed Sep 5, 2016
1 parent 7460a30 commit 47fc608
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/react_on_rails/assets_precompile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ module ReactOnRails
let(:nondigest_filename) { "alfa.js" }

let(:checker) do
f = File.new(assets_path.join("manifest-alfa.json"), "w")
f.write("{\"assets\":{\"#{nondigest_filename}\": \"#{digest_filename}\"}}")
f.close
File.open(assets_path.join("manifest-alfa.json"), "w") do |f|
f.write("{\"assets\":{\"#{nondigest_filename}\": \"#{digest_filename}\"}}")
end

AssetsPrecompile.new(assets_path: assets_path,
symlink_non_digested_assets_regex: Regexp.new('.*\.js$'))
Expand Down

0 comments on commit 47fc608

Please sign in to comment.