Sha256: fe6ed571408ccc09896275c4b4402607c3cf0c64b22fb9c851b2807add0d4ccf

Contents?: true

Size: 1008 Bytes

Versions: 2

Compression:

Stored size: 1008 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

require File.expand_path(File.join(__FILE__,'..','..','test_helper'))

module NewRelic
  class LatestChangesTest < MiniTest::Test

    def test_read_default_changelog
      result = NewRelic::LatestChanges.read
      assert_match(/# New Relic Ruby Agent Release Notes #/, result)
      assert_match(/## v\d\.\d{1,2}\.\d{1,2} ##/, result)
    end

    def test_latest_changes_from_fakechangelog
      result = NewRelic::LatestChanges.read(File.join(File.dirname(__FILE__), 'FAKECHANGELOG'))
      assert_match(/3.7.2/, result)
    end

    def test_patch_latest_changes_from_fakechangelog
      result = NewRelic::LatestChanges.read_patch('3.7.2.4242', File.join(File.dirname(__FILE__), 'FAKECHANGELOG'))
      expected = <<END
## v3.7.2.4242 ##

* Patch (3.7.2.4242)

  Patch for something
END
      assert_equal expected, result
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
newrelic_rpm-4.1.0.333 test/new_relic/latest_changes_test.rb
newrelic_rpm-4.0.0.332 test/new_relic/latest_changes_test.rb