Skip to content

Commit

Permalink
Use fixture for test
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Aug 8, 2024
1 parent c428884 commit 8dc23d1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/setup_bundler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -484,20 +484,14 @@ def test_ensures_lockfile_remotes_are_relative_to_default_gemfile

def test_ruby_lsp_rails_is_automatically_included_in_rails_apps
Dir.mktmpdir do |dir|
FileUtils.mkdir("#{dir}/config")
FileUtils.cp("test/fixtures/rails_application.rb", "#{dir}/config/application.rb")
Dir.chdir(dir) do
File.write(File.join(dir, "Gemfile"), <<~GEMFILE)
source "https://rubygems.org"
gem "rails"
GEMFILE

FileUtils.mkdir(File.join(dir, "config"))
File.write(File.join(dir, "config", "application.rb"), <<~RUBY)
module MyApp
class Application < Rails::Application
end
end
RUBY

capture_subprocess_io do
Bundler.with_unbundled_env do
# Run bundle install to generate the lockfile
Expand Down

0 comments on commit 8dc23d1

Please sign in to comment.