Skip to content

Commit b3fdee5

Browse files
committed
Don't reset all 3 databases in setup
Just reset the current database selected.
1 parent c179f28 commit b3fdee5

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

Rakefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,20 @@ task :test do
1919
sh("TARGET_DB=#{database} bin/rails test")
2020
end
2121
end
22+
23+
namespace :test do
24+
task :mysql do
25+
sh("TARGET_DB=mysql bin/setup")
26+
sh("TARGET_DB=mysql bin/rails test")
27+
end
28+
29+
task :postgres do
30+
sh("TARGET_DB=postgres bin/setup")
31+
sh("TARGET_DB=postgres bin/rails test")
32+
end
33+
34+
task :sqlite do
35+
sh("TARGET_DB=sqlite bin/setup")
36+
sh("TARGET_DB=sqlite bin/rails test")
37+
end
38+
end

bin/setup

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,4 @@ bundle
1515

1616
echo "Creating databases..."
1717

18-
rails db:reset TARGET_DB=sqlite
19-
rails db:reset TARGET_DB=mysql
20-
rails db:reset TARGET_DB=postgres
18+
rails db:reset

0 commit comments

Comments
 (0)