Improve performance of feed_manager_spec (#6517)

This commit is contained in:
abcang 2018-02-21 00:50:12 +09:00 committed by Eugen Rochko
parent 66105929e0
commit 7124881273

View file

@ -1,7 +1,14 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe FeedManager do RSpec.describe FeedManager do
it 'tracks at least as many statuses as reblogs' do before do |example|
unless example.metadata[:skip_stub]
stub_const 'FeedManager::MAX_ITEMS', 10
stub_const 'FeedManager::REBLOG_FALLOFF', 4
end
end
it 'tracks at least as many statuses as reblogs', skip_stub: true do
expect(FeedManager::REBLOG_FALLOFF).to be <= FeedManager::MAX_ITEMS expect(FeedManager::REBLOG_FALLOFF).to be <= FeedManager::MAX_ITEMS
end end