Skip to content

Commit

Permalink
Use tempfile test fixture, it's installed with local
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jul 7, 2023
1 parent 9dc7fce commit 2b83ce6
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions test/test_bundled_gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ def test_bundled_gems_in_load_path
Dir.chdir(tmpdir) do
File.open("Gemfile", "w+") do |f|
f.puts "source 'https://rubygems.org'"
f.puts "gem 'rss', '0.2.9'"
f.puts "gem 'tempfile', '0.1.3'"
end
File.open("Gemfile.lock", "w+") do |f|
f.puts <<~'LOCK'
GEM
remote: https://rubygems.org/
specs:
rexml (3.2.5)
rss (0.2.9)
rexml
tempfile (0.1.3)
PLATFORMS
ruby
Expand All @@ -33,7 +31,7 @@ def test_bundled_gems_in_load_path
assert_include $LOAD_PATH.join(":"), "#{name}-#{version}/lib"
end
assert_include $LOAD_PATH.join(":"), "rss-0.2.9/lib"
assert_include $LOAD_PATH.join(":"), "tempfile-0.1.3/lib"
end
end
end;
Expand All @@ -52,16 +50,14 @@ class << self
Dir.chdir(tmpdir) do
File.open("Gemfile", "w+") do |f|
f.puts "source 'https://rubygems.org'"
f.puts "gem 'rss', '0.2.9'"
f.puts "gem 'tempfile', '0.1.3'"
end
File.open("Gemfile.lock", "w+") do |f|
f.puts <<~'LOCK'
GEM
remote: https://rubygems.org/
specs:
rexml (3.2.5)
rss (0.2.9)
rexml
tempfile (0.1.3)
PLATFORMS
ruby
Expand All @@ -83,7 +79,7 @@ class << self
assert_not_include $LOAD_PATH.join(":"), "#{name}-#{version}/lib"
end
assert_include $LOAD_PATH.join(":"), "rss-0.2.9/lib"
assert_include $LOAD_PATH.join(":"), "tempfile-0.1.3/lib"
end
end
end;
Expand Down

0 comments on commit 2b83ce6

Please sign in to comment.