diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-01-10 20:18:31 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-09-28 14:54:22 +0900 |
commit | 0629e695e3130f875641542ad2593b19b56703ef () | |
tree | 9fcab4edb8df8c74c695118838b48ab6a44d7a22 /test/rubygems/test_gem_commands_build_command.rb | |
parent | 67ae1d441dbc2d944a08b95178f99d2cf67169e1 (diff) |
Added `--platform` option to `build` command
Notes: Merged: https://.com/ruby/ruby/pull/3599
-rw-r--r-- | test/rubygems/test_gem_commands_build_command.rb | 32 |
1 files changed, 28 insertions, 4 deletions
@@ -37,6 +37,8 @@ class TestGemCommandsBuildCommand < Gem::TestCase assert @cmd.options[:force] assert @cmd.options[:strict] end def test_options_filename @@ -86,6 +88,26 @@ class TestGemCommandsBuildCommand < Gem::TestCase util_test_build_gem @gem end def test_execute_bad_name [".", "-", "_"].each do |special_char| gem = util_spec 'some_gem_with_bad_name' do |s| @@ -327,27 +349,29 @@ class TestGemCommandsBuildCommand < Gem::TestCase refute File.exist?(expected_gem) end - def util_test_build_gem(gem) use_ui @ui do Dir.chdir @tempdir do @cmd.execute end end - output = @ui.output.split "\n" assert_equal " Successfully built RubyGem", output.shift assert_equal " Name: some_gem", output.shift assert_equal " Version: 2", output.shift - assert_equal " File: some_gem-2.gem", output.shift assert_equal [], output - gem_file = File.join(@tempdir, File.basename(gem.cache_file)) assert File.exist?(gem_file) spec = Gem::Package.new(gem_file).spec assert_equal "some_gem", spec.name assert_equal "this is a summary", spec.summary end def test_execute_force |