File: changelog_test.rb

package info (click to toggle)
ruby-byebug 12.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,304 kB
  • sloc: ruby: 9,013; ansic: 1,678; sh: 5; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (4)
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