summaryrefslogtreecommitdiffstats
path: root/spec/rails_helper.rb
diff options
context:
space:
mode:
authorAkihiko Odaki (@fn_aki@pawoo.net) <akihiko.odaki.4i@stu.hosei.ac.jp>2017-06-28 21:50:23 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-28 14:50:23 +0200
commit7d8e3721aea71315b0ef8e66cdc2ede0fe6ffc2a (patch)
tree20dbe2a273fd8ffa22d9e85d3bc9e5de81a89c01 /spec/rails_helper.rb
parentfb421a1f46d956e62d27d0227e6853c709f2c88e (diff)
Overwrite old statuses with reblogs in PrecomputeFeedService (#3984)
Diffstat (limited to 'spec/rails_helper.rb')
-rw-r--r--spec/rails_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index cfc9eec9ea0..9a4c8fd3c9f 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -13,6 +13,7 @@ Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
ActiveRecord::Migration.maintain_test_schema!
WebMock.disable_net_connect!
+Redis.current = Redis::Namespace.new("mastodon_test#{ENV['TEST_ENV_NUMBER']}", redis: Redis.current)
Sidekiq::Testing.inline!
Sidekiq::Logging.logger = nil
@@ -43,6 +44,11 @@ RSpec.configure do |config|
https = ENV['LOCAL_HTTPS'] == 'true'
Capybara.app_host = "http#{https ? 's' : ''}://#{ENV.fetch('LOCAL_DOMAIN')}"
end
+
+ config.after :each do
+ keys = Redis.current.keys
+ Redis.current.del(keys) if keys.any?
+ end
end
RSpec::Sidekiq.configure do |config|