From e9d19fcfb276a892208ccab53f317da5d4fedee3 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Fri, 13 May 2016 18:55:17 -0300 Subject: [PATCH] statistics: fix optional dependency on products plugin --- plugins/statistics/test/unit/statistics_block_test.rb | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/plugins/statistics/test/unit/statistics_block_test.rb b/plugins/statistics/test/unit/statistics_block_test.rb index d7d5fee..d4fd26f 100644 --- a/plugins/statistics/test/unit/statistics_block_test.rb +++ b/plugins/statistics/test/unit/statistics_block_test.rb @@ -1,4 +1,5 @@ require_relative '../test_helper' + class StatisticsBlockTest < ActiveSupport::TestCase ['user_counter', 'tag_counter', 'comment_counter'].map do |counter| @@ -140,6 +141,8 @@ class StatisticsBlockTest < ActiveSupport::TestCase end should 'return the amount of visible environment products' do + return unless defined? ProductsPlugin + b = StatisticsBlock.new e = fast_create(Environment) @@ -160,6 +163,8 @@ class StatisticsBlockTest < ActiveSupport::TestCase end should 'return the amount of visible enterprise products' do + return unless defined? ProductsPlugin + b = StatisticsBlock.new e = fast_create(Enterprise) -- libgit2 0.21.2