Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mocha ~1.1 incompatibility with minitest #752

Merged
merged 7 commits into from
Oct 16, 2023

Conversation

ahasunos
Copy link
Contributor

Description

The omnibus build is currently failing because Mocha ~1.1 is incompatible with minitest v5.19 and later and it results to an error as:

.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/mocha-1.16.1/lib/mocha/integration/mini_test/adapter.rb:26:in `included': uninitialized constant MiniTest (NameError)

          Mocha::ExpectationErrorFactory.exception_class = ::MiniTest::Assertion
                                                           ^^^^^^^^^^
Did you mean?  Minitest

Build link here: https://buildkite.com/chef-oss/inspec-train-main-verify/builds/876

This would require upgrade to mocha and rename the occurence of MiniTest::Mock.new to Minitest::Mock.new in our codebase.

This PR fixes the incompatibility of mocha with minitest

Related Issue

Mocha ~1.1 is incompatible with minitest v5.19 and later

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

@ahasunos ahasunos requested a review from a team as a code owner October 12, 2023 06:21
@ahasunos ahasunos force-pushed the ss/fix-mocha-incompatibility branch 2 times, most recently from 019bfea to bc91df3 Compare October 12, 2023 06:27
Gemfile Outdated Show resolved Hide resolved
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
@ahasunos ahasunos force-pushed the ss/fix-mocha-incompatibility branch 2 times, most recently from 63380ff to 1ce40c6 Compare October 13, 2023 06:12
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
…doing bundle install as we don't have any integration test running and we don't want any dependency on chef and berkshef

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
@Vasu1105 Vasu1105 force-pushed the ss/fix-mocha-incompatibility branch from 787626a to 6c19a55 Compare October 16, 2023 06:46
@Vasu1105 Vasu1105 merged commit 7392981 into main Oct 16, 2023
1 check passed
@ahasunos ahasunos deleted the ss/fix-mocha-incompatibility branch October 17, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants