summaryrefslogtreecommitdiff
path: root/test/rubygems/test_rake_package.rb
blob: 7a2682771eea4221f81a580823779b0f866f4e51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

require "rubygems/test_case"
require "open3"

class TestRakePackage < Minitest::Test

  def test_builds_ok
    skip unless File.exist?(File.expand_path("../../../Rakefile", __FILE__))

    output, status = Open3.capture2e("rake package")

    assert_equal true, status.success?, <<~MSG.chomp
      Expected `rake package` to work, but got errors:

      ```
      #{output}
      ```

      If you have added or removed files, make sure you run `rake update_manifest` to update the `Manifest.txt` accordingly
    MSG
  end

end