summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_search_command.rb
blob: 05e7cff892ed91484eea5ce5aaf9ed491fd61b6b (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
25
require 'rubygems/test_case'
require 'rubygems/commands/search_command'

class TestGemCommandsSearchCommand < Gem::TestCase

  def setup
    super

    @cmd = Gem::Commands::SearchCommand.new
  end

  def test_execute
    @cmd.handle_options %w[a]

    use_ui @ui do
      @cmd.execute
    end

    assert_match %r%REMOTE GEMS%, @ui.output

    assert_empty @ui.error
  end

end