Permalink
Browse files

Handle gems with same name but different case. Also add test to ensur…

…e GemRunnerProxy#run returns multiple lines as an array
  • Loading branch information...
thewoolleyman committed Aug 25, 2009
1 parent eacdfda commit 7f901954e12138aa1f8da8baf41109ac40063804
Showing with 10 additions and 1 deletion.
  1. +1 −1 lib/geminstaller/exact_match_list_command.rb
  2. +9 −0 spec/functional/gem_runner_proxy_spec.rb
@@ -5,7 +5,7 @@ def execute
# This overrides the default RubyGems ListCommand behavior of doing a wildcard match. This caused problems
# when some gems (ActiveRecord-JDBC) caused exceptions during a remote list, causing a remote list
# of other gems (activerecord) to fail as well
options[:name] = /^#{string}$/i
options[:name] = /^#{string}$/
# Do a little metaprogramming magic to avoid calling the problematic execute method on the ListCommand
# superclass, and instead directly call the method on the QueryCommand grandparent 'supersuperclass'
unbound_execute_method = QUERY_COMMAND_CLASS.instance_method(:execute)
@@ -27,6 +27,15 @@
output.join("\n").should match(expected_output)
end

it "should return multi-line output as an array" do
gem_runner_args = ["search", "--remote"]
gem_runner_args += install_options_for_testing

output = @gem_runner_proxy.run(gem_runner_args)

output.size.should be > 1
end

it "should not throw an error if there is an normal rubygems exit via terminate_interaction" do
gem_runner_args = ["--help"]

0 comments on commit 7f90195

Please sign in to comment.