Actions
Defect #33044
closedSimpleCov 0.18.3 causes NameError during tests
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Gems support
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
I observed the following error when running tests after updating SimpleCov from 0.18.2 to 0.18.3.
$ bin/rails test test/functional/email_addresses_controller_test.rb Run options: --seed 4397 # Running: ................ Finished in 4.072047s, 3.9292 runs/s, 10.8054 assertions/s. 16 runs, 44 assertions, 0 failures, 0 errors, 0 skips Traceback (most recent call last): 2: from /Users/maeda/redmines/gems/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest.rb:64:in `block (2 levels) in autorun' 1: from /Users/maeda/redmines/gems/ruby/2.6.0/gems/minitest-5.14.0/lib/minitest.rb:64:in `reverse_each' /Users/maeda/redmines/gems/ruby/2.6.0/gems/simplecov-0.18.3/lib/minitest/simplecov_plugin.rb:8:in `block in plugin_simplecov_init': uninitialized constant Minitest::SimpleCov (NameError)
Related issues
Updated by Go MAEDA over 4 years ago
The issue is not yet fixed in SimpleCov 0.18.4.
Updated by Go MAEDA over 4 years ago
You don't see the error if the following change is applied (it is just a workaround. I don't intend to commit the change as is. I think more deep inspection is needed).
diff --git a/test/test_helper.rb b/test/test_helper.rb
index b3956e9af..10f8f52fd 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -17,8 +17,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+require 'simplecov'
if ENV["COVERAGE"]
- require 'simplecov'
require File.expand_path(File.dirname(__FILE__) + "/coverage/html_formatter")
SimpleCov.formatter = Redmine::Coverage::HtmlFormatter
SimpleCov.start 'rails'
Updated by Pavel Rosický over 4 years ago
Updated by Mizuki ISHIKAWA over 4 years ago
Version 0.18.5 of simplecov has been released.
I confirmed that there was no problem with that version.
Updated by Go MAEDA over 4 years ago
- Related to Patch #32950: Update simplecov to 0.18 added
Updated by Go MAEDA over 4 years ago
- Status changed from New to Closed
- Resolution set to Fixed
Updated Gemfile not to use Simplecov 0.18.4 or earlier.
Actions