Skip to content

Commit cc63974

Browse files
committed
speed up tests by not copying bundled directory every time
1 parent 7280284 commit cc63974

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lib/spring/test/acceptance_test.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,13 @@ def exec_name
194194
end
195195

196196
test "binstub when spring is uninstalled" do
197-
app.run! "gem uninstall --ignore-dependencies spring"
198-
File.write(app.gemfile, app.gemfile.read.gsub(/gem 'spring.*/, ""))
199-
assert_success "bin/rake -T", stdout: "rake db:migrate"
197+
begin
198+
app.run! "gem uninstall --ignore-dependencies spring"
199+
File.write(app.gemfile, app.gemfile.read.gsub(/gem 'spring.*/, ""))
200+
assert_success "bin/rake -T", stdout: "rake db:migrate"
201+
ensure
202+
generator.build_and_install_gems
203+
end
200204
end
201205

202206
test "binstub upgrade" do

lib/spring/test/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def gemfile
4848
end
4949

5050
def gem_home
51-
path "vendor/gems/#{RUBY_VERSION}"
51+
path "../gems/#{RUBY_VERSION}"
5252
end
5353

5454
def user_home

0 commit comments

Comments
 (0)