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,6 +3,7 @@ require_relative "test_helper" | ||
3 | class MultiTenancyTest < Minitest::Test | 3 | class MultiTenancyTest < Minitest::Test |
4 | def setup | 4 | def setup |
5 | skip unless defined?(Apartment) | 5 | skip unless defined?(Apartment) |
6 | + super | ||
6 | end | 7 | end |
7 | 8 | ||
8 | def test_basic | 9 | def test_basic |
@@ -14,7 +15,9 @@ class MultiTenancyTest < Minitest::Test | @@ -14,7 +15,9 @@ class MultiTenancyTest < Minitest::Test | ||
14 | assert_search "product", ["Product A"], {load: false}, Tenant | 15 | assert_search "product", ["Product A"], {load: false}, Tenant |
15 | Apartment::Tenant.switch!("tenant2") | 16 | Apartment::Tenant.switch!("tenant2") |
16 | assert_search "product", ["Product B"], {load: false}, Tenant | 17 | assert_search "product", ["Product B"], {load: false}, Tenant |
17 | - ensure | 18 | + end |
19 | + | ||
20 | + def teardown | ||
18 | Apartment::Tenant.reset | 21 | Apartment::Tenant.reset |
19 | end | 22 | end |
20 | end | 23 | end |