Skip to content

Commit

Permalink
Add required DB cleaner setup code
Browse files Browse the repository at this point in the history
  • Loading branch information
luisramos0 committed May 9, 2021
1 parent d2cf1d0 commit 913ba1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/lib/open_food_network/i18n_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

module OpenFoodNetwork
describe I18nConfig do
before do
# These are only needed here because we are stubbing ENV elsewhere in this file
# Here we make these calls to ENV return a value and that makes database_cleaner work
allow(ENV).to receive(:[]).with("DATABASE_CLEANER_ALLOW_PRODUCTION").and_return("false")
allow(ENV).to receive(:[]).with("DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL").
and_return("false")
end

context "in default test configuration" do
before do
allow(ENV).to receive(:[]).with("LOCALE").and_return("en")
Expand Down

0 comments on commit 913ba1c

Please sign in to comment.