File: changelog_test.rb

package info (click to toggle)
ruby-byebug 11.1.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,252 kB
  • sloc: ruby: 8,835; ansic: 1,662; sh: 6; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

require "test_helper"

module Byebug
  #
  # Tests sanity of changelog file.
  #
  class ChangelogTest < Minitest::Test
    def test_has_definitions_for_all_releases
      changelog.scan(/\[([0-9]+\.[0-9]+\.[0-9]+)\] /).flatten.uniq.each do |release_version|
        assert_match %r{^\[#{release_version}\]: https://github\.com/deivid-rodriguez/byebug/compare/v[0-9]+\.[0-9]+\.[0-9]+...v#{release_version}}, changelog
      end
    end

    private

    def changelog
      File.read("CHANGELOG.md")
    end
  end
end