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

Decide whether v3.0.0 can be released #736

Open
floehopper opened this issue Jan 28, 2025 · 8 comments
Open

Decide whether v3.0.0 can be released #736

floehopper opened this issue Jan 28, 2025 · 8 comments
Assignees

Comments

@floehopper
Copy link
Member

@floehopper floehopper self-assigned this Jan 28, 2025
@floehopper
Copy link
Member Author

@lastgabs @rafaelfranca @adrianna-chang-shopify I'd really appreciate it if one of you could try out the Mocha release candidate (v3.0.0.pre.rc.1) in one of your bigger projects when you have time? (@byroot suggested I contacted you).

@adrianna-chang-shopify
Copy link

👋 Hey @floehopper , we're unfortunately a couple versions behind in our monolith at Shopify (v2.5.0), but I'll bring this up with the team and see if we can get back on top of these + help test out the RC.

@floehopper
Copy link
Member Author

@adrianna-chang-shopify Oh, that would be great - many thanks! ❤ Let me know if you run into any issues.

@floehopper
Copy link
Member Author

@adrianna-chang-shopify Have you had a chance to try the RC yet?

@adrianna-chang-shopify
Copy link

ccing @etiennebarrie who started looking at this. We had a lot of failures related to the 2.6 => 2.7 upgrade that we were still working through last I'd heard :(

@floehopper
Copy link
Member Author

@adrianna-chang-shopify Many thanks for the update.

@etiennebarrie let me know if there's anything I can do to help.

@etiennebarrie
Copy link

I'm still off until next week, but the main thing I remember is this kind of pattern:

require "bundler/inline"

gemfile do
  source "https://rubygems.org"
  gem "mocha", ARGV.fetch(0, "~> 2.5.0")
  gem "minitest"
end

require "minitest/autorun"
require "mocha/minitest"

module SomeModule
end

class SomeTest < Minitest::Test
  def test_passes
    SomeModule.stubs(:name).returns("Other")
    SomeModule.expects(:name).never # incorrect expectation
    assert_equal "Other", SomeModule.name
    SomeModule.name # doesn't raise
  end
end

To be clear this is an incorrectly written test, the never didn't have any effect, as evidenced by the last line of the test here.
But it passed with 2.5, warned with 2.6 (#681) and now fails with 2.7, so as far as we're concerned, 2.7.0 is the version that includes breaking changes.

We have a few of tests written like that, and I wanted to actually fix those tests (add expectations about invocations not happening) and it's a bit more involved, so I didn't have a chance to test 3.0 yet. I should have just skipped those tests in a branch and tested the release candidate directly, sorry about that.

@floehopper
Copy link
Member Author

@etiennebarrie Ah, OK - thanks for interrupting your time off to provide that update. I quite understand your desire to fix those tests.

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

No branches or pull requests

3 participants