Sha256: ffade7773e37a8d8c377d5f6bd0676246b94562492a2e377eeaf551fc3fa8213
Contents?: true
Size: 1.09 KB
Versions: 13
Compression:
Stored size: 1.09 KB
Contents
# frozen_string_literal: true require 'rubygems/test_case' require 'rubygems/indexer' require 'rubygems/commands/generate_index_command' class TestGemCommandsGenerateIndexCommand < Gem::TestCase def setup super @cmd = Gem::Commands::GenerateIndexCommand.new @cmd.options[:directory] = @gemhome end def test_execute use_ui @ui do @cmd.execute end specs = File.join @gemhome, "specs.4.8.gz" assert File.exist?(specs), specs end def test_handle_options_directory return if win_platform? refute_equal '/nonexistent', @cmd.options[:directory] @cmd.handle_options %w[--directory /nonexistent] assert_equal '/nonexistent', @cmd.options[:directory] end def test_handle_options_directory_windows return unless win_platform? refute_equal '/nonexistent', @cmd.options[:directory] @cmd.handle_options %w[--directory C:/nonexistent] assert_equal 'C:/nonexistent', @cmd.options[:directory] end def test_handle_options_update @cmd.handle_options %w[--update] assert @cmd.options[:update] end end if ''.respond_to? :to_xs
Version data entries
13 entries across 13 versions & 1 rubygems