We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e2dd326 + e60311f commit 770b2b1Copy full SHA for 770b2b1
lib/spring/test/acceptance_test.rb
@@ -58,6 +58,14 @@ def assert_speedup(ratio = DEFAULT_SPEEDUP)
58
end
59
60
61
+ def without_gem(name)
62
+ gem_home = app.gem_home.join('gems')
63
+ FileUtils.mv(gem_home.join(name), app.root)
64
+ yield
65
+ ensure
66
+ FileUtils.mv(app.root.join(name), gem_home)
67
+ end
68
+
69
setup do
70
generator.generate_if_missing
71
generator.install_spring
@@ -193,12 +201,9 @@ def exec_name
193
201
194
202
195
203
test "binstub when spring is uninstalled" do
196
- begin
197
- app.run! "gem uninstall --ignore-dependencies spring"
204
+ without_gem "spring-#{Spring::VERSION}" do
198
205
File.write(app.gemfile, app.gemfile.read.gsub(/gem 'spring.*/, ""))
199
206
assert_success "bin/rake -T", stdout: "rake db:migrate"
200
- ensure
- generator.build_and_install_gems
207
208
209
0 commit comments