Skip to content

Commit

Permalink
test: fix tests running twice
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorton committed Mar 16, 2024
1 parent d7e0bd0 commit 88788b9
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/veksel_test.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
require "test_helper"

class VekselTest < ActiveSupport::TestCase
test "it has a version number" do
assert Veksel::VERSION
end

module TestHelpers
def git_checkout(branch, &blk)
system!("git checkout -q -B #{branch}")
blk.call if block_given?
Expand All @@ -21,8 +17,18 @@ def setup
system!('bin/rails veksel:clean')
end
end
end

class VekselTest < ActiveSupport::TestCase
include TestHelpers

test "it has a version number" do
assert Veksel::VERSION
end

class IntegrationTests < ActiveSupport::TestCase
include TestHelpers

class IntegrationTests < VekselTest
def run_fork_test
system!('bundle exec veksel fork')
current_db = `bin/rails runner "print ApplicationRecord.connection.execute('SELECT current_database();')[0]['current_database']"`.chomp
Expand Down

0 comments on commit 88788b9

Please sign in to comment.