diff options
-rw-r--r-- | test/rubygems/test_gem_commands_contents_command.rb | 49 |
1 files changed, 46 insertions, 3 deletions
@@ -9,8 +9,8 @@ class TestGemCommandsContentsCommand < Gem::TestCase @cmd = Gem::Commands::ContentsCommand.new end - def gem name - spec = quick_gem name do |gem| gem.files = %W[lib/#{name}.rb Rakefile] end write_file File.join(*%W[gems #{spec.full_name} lib #{name}.rb]) @@ -135,6 +135,40 @@ class TestGemCommandsContentsCommand < Gem::TestCase assert_equal "", @ui.error end def test_execute_no_prefix @cmd.options[:args] = %w[foo] @cmd.options[:prefix] = false @@ -183,13 +217,22 @@ lib/foo.rb assert @cmd.options[:prefix] assert_empty @cmd.options[:specdirs] assert_nil @cmd.options[:version] - @cmd.send :handle_options, %w[-l -s foo --version 0.0.2 --no-prefix] assert @cmd.options[:lib_only] refute @cmd.options[:prefix] assert_equal %w[foo], @cmd.options[:specdirs] assert_equal Gem::Requirement.new('0.0.2'), @cmd.options[:version] end end |