Skip to content

Commit 95d0011

Browse files
committed
Reset Current.site between tests
In order to prevent test pollution when a previous test sets `Current.site` to a value that differs from `Site.first`, which could cause `Language.default` to return `nil` and trigger uniqueness conflicts in factories.
1 parent 46f02cf commit 95d0011

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/rails_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282

8383
config.use_transactional_fixtures = true
8484

85-
# All specs are running in transactions, but feature specs not.
8685
config.before(:each) do
86+
Alchemy::Current.site = nil
8787
::I18n.locale = :en
8888
end
8989

0 commit comments

Comments
 (0)