reload app config before each test

(complements 21bef8e304d05025b72b39e790abc7e8a4f4f5e1)
This commit is contained in:
wvengen 2014-04-04 12:25:57 +02:00
parent ed439d0b08
commit 6d98be6d22
3 changed files with 18 additions and 0 deletions

View file

@ -37,6 +37,12 @@ RSpec.configure do |config|
DatabaseCleaner.clean
end
# reload foodsoft configuration, so that tests can use FoodsoftConfig.config[:foo]=x
# without messing up tests run after that
config.before(:each) do
FoodsoftConfig.send :reload!
end
# If true, the base class of anonymous controllers will be inferred
# automatically. This will be the default behavior in future versions of
# rspec-rails.