Commit c54d92a34e1542d7a51648b52fbcf43d53480d89
1 parent
a31489fd
Exists in
master
and in
21 other branches
Better test setup
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
test/multi_tenancy_test.rb
... | ... | @@ -3,6 +3,7 @@ require_relative "test_helper" |
3 | 3 | class MultiTenancyTest < Minitest::Test |
4 | 4 | def setup |
5 | 5 | skip unless defined?(Apartment) |
6 | + super | |
6 | 7 | end |
7 | 8 | |
8 | 9 | def test_basic |
... | ... | @@ -14,7 +15,9 @@ class MultiTenancyTest < Minitest::Test |
14 | 15 | assert_search "product", ["Product A"], {load: false}, Tenant |
15 | 16 | Apartment::Tenant.switch!("tenant2") |
16 | 17 | assert_search "product", ["Product B"], {load: false}, Tenant |
17 | - ensure | |
18 | + end | |
19 | + | |
20 | + def teardown | |
18 | 21 | Apartment::Tenant.reset |
19 | 22 | end |
20 | 23 | end | ... | ... |