Skip to content

Commit 8db4681

Browse files
committed
Release v1.3.0
1 parent 5b2b5d9 commit 8db4681

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## [Unreleased]
22

3+
## [1.3.0] - 2021-10-10
4+
5+
- Integrate with Rails default testing toolchain (Minitest + Capybara)
6+
- Integrate with RSpec + Capybara
37

48
## [1.2.0] - 2021-10-08
59

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ MultiTenantSupport.under_tenant amazon do
237237
end
238238
```
239239
240+
### Set current tenant global
241+
242+
```ruby
243+
MultiTenantSupport::Current.tenant_account = account
244+
```
245+
240246
### Disallow read across tenant by default
241247
242248
This gem disallow read across tenant by default. You can check current state through:
@@ -348,17 +354,19 @@ Above code will make sure the `MultiTenantSupport.current_tenant` won't accident
348354
With above testing requre code
349355
350356
```ruby
351-
setup do
352-
MultiTenantSupport::Current.tenant_account = account
353-
end
354-
357+
# Integration test
355358
test "a integration test" do
359+
host! "apple.example.com"
360+
356361
assert_no_changes "MultiTenantSupport.current_tenant" do
357362
get users_path
358363
end
359364
end
360365
366+
# System test
361367
test "a system test" do
368+
Capybara.app_host = "http://apple.example.com"
369+
362370
assert_no_changes "MultiTenantSupport.current_tenant" do
363371
visit users_path
364372
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module MultiTenantSupport
2-
VERSION = '1.2.0'
2+
VERSION = '1.3.0'
33
end

0 commit comments

Comments
 (0)