Skip to content

Fix version_cut_spec.rb tests

What does this MR do?

This merge request includes a set of changes aimed at fixing broken tests within the version_cut_spec.rb file. The primary adjustments involve correcting expectations within various test cases to use the proper RSpec syntax for assertions, specifically changing from using == for comparison to .to eq() for equality checks. This ensures that the tests accurately verify the outcomes against expected values.

Key modifications include:

  1. Fixing a typo from 'version fiels' to 'version fields' in one of the context descriptions, enhancing readability.
  2. Updating assertions to properly validate the major, minor, and patch components of version strings, as well as the cross_total calculations, by comparing them against expected values using .to eq().
  3. Ensuring that boolean checks for methods like is_initial_version? are correctly asserted with .to eq(true) or .to eq(false), providing clarity on expected outcomes.

What are the relevant issue numbers?

Audit semver_dialects tests (gitlab-org/gitlab#439114 - closed) • Philip Cunningham • 16.10

Does this MR meet the acceptance criteria?

Merge request reports