webmock icon indicating copy to clipboard operation
webmock copied to clipboard

Unable to use require 'webmock/test_unit' after version 3.9.5

Open rmichelli opened this issue 3 years ago • 2 comments

require 'webmock/test_unit' line throws this error

/src/.gem/ruby/gems/webmock-3.14.0/lib/webmock/test_unit.rb:11:in `<class:TestCase>': undefined local variable or method `teardown' for Test::Unit::TestCase:Class (NameError)

using: rails LTS 3.2.22.25 ruby 2.7.1p83

Problem appears to be this line introduced in this pr.

current workaround is to restrict version to 3.9.4

rmichelli avatar Dec 29 '21 17:12 rmichelli

@rmichelli any chance you have some old version of test-unit gem loaded?

bblimke avatar Dec 29 '21 20:12 bblimke

Yes @bblimke - test-unit gem was locked at 1.2.3 Updating it appears to have resolved the issue Thanks for the feedback

rmichelli avatar Dec 30 '21 00:12 rmichelli