diff options
author | abcang <abcang1015@gmail.com> | 2018-02-21 00:50:12 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-02-20 16:50:12 +0100 |
commit | 712488127380dbdd5bde2783d98f0e9793f4d97b (patch) | |
tree | cbe081224d7a9e94ca052b960f9d25be336330e4 | |
parent | 66105929e07fc7ddbdb8b66696b9ce1ed5d25957 (diff) |
Improve performance of feed_manager_spec (#6517)
-rw-r--r-- | spec/lib/feed_manager_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/lib/feed_manager_spec.rb b/spec/lib/feed_manager_spec.rb index f2103a4b1..c6bc388e0 100644 --- a/spec/lib/feed_manager_spec.rb +++ b/spec/lib/feed_manager_spec.rb @@ -1,7 +1,14 @@ require 'rails_helper' 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 end |