10000 Don't abort `bin/rake` when test application exists (#5813) · activeadmin/activeadmin@392115d · GitHub
[go: up one dir, main page]

Skip to content

Commit 392115d

Browse files
Don't abort bin/rake when test application exists (#5813)
1 parent 40199c8 commit 392115d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tasks/test.rake

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace :setup do
99
task :force, [:rails_env, :template] => [:require, :rm, :run]
1010

1111
desc "Create a test rails app for the parallel specs to run against if it doesn't exist already"
12-
task :create, [:rails_env, :template] => [:require, :guard, :run]
12+
task :create, [:rails_env, :template] => [:require, :run]
1313

1414
desc "Makes test app creation code available"
1515
task :require do
@@ -24,17 +24,14 @@ namespace :setup do
2424

2525
desc "Create a test rails app for the parallel specs to run against"
2626
task :run, [:rails_env, :template] do |_t, opts|
27-
ActiveAdmin::TestApplication.new(opts).generate
28-
end
29-
30-
desc "Aborts if the test app already exists"
31-
task :guard, [:rails_env, :template] do |_t, opts|
3227
test_app = ActiveAdmin::TestApplication.new(opts)
3328

3429
app_dir = test_app.app_dir
3530

3631
if File.exist? app_dir
37-
abort "test app #{app_dir} already exists; skipping test app generation"
32+
puts "test app #{app_dir} already exists; skipping test app generation"
33+
else
34+
test_app.generate
3835
end
3936
end
4037

0 commit comments

Comments
 (0)
0