Apache Solr open-source search software
refactor the solr mock a bit more
Erik Hatcher9da08c70d726
diff --git a/client/ruby/solrb/Rakefile b/client/ruby/solrb/Rakefileindex 7954779f569..b6ec03a342a 100644--- a/client/ruby/solrb/Rakefile+++ b/client/ruby/solrb/Rakefile@@ -45,7 +45,7 @@ endRake::TestTask.new('test') do |t|t.pattern = 'test/*_test.rb't.verbose = true- t.ruby_opts = ['-r solr', '-r test/unit']+ t.ruby_opts = ['-r solr', '-r test/unit', '-Itest']endtask :test dodiff --git a/client/ruby/solrb/test/connection_test.rb b/client/ruby/solrb/test/connection_test.rbindex 9420911a55e..04d2b57fb3a 100755--- a/client/ruby/solrb/test/connection_test.rb+++ b/client/ruby/solrb/test/connection_test.rb@@ -12,23 +12,9 @@require 'test/unit'require 'solr'+require 'solr_mock_base'-module Solr- class Connection- def post(request)- "foo"- end- end-- class MockSolrBaseTest < Test::Unit::TestCase- def test_mock- connection = Connection.new("http://localhost:9999")- assert_equal "foo", connection.post(UpdateRequest.new("bogus"))- end- end-end--class ConnectionTest < Solr::MockSolrBaseTest+class ConnectionTest < SolrMockBaseTestCasedef test_connection_initializerequest = Solr::UpdateRequest.new("<commit/>")connection = Solr::Connection.new("http://localhost:8983")diff --git a/client/ruby/solrb/test/test_helper.rb b/client/ruby/solrb/test/test_helper.rbindex e6912b362c8..f13e0265939 100644--- a/client/ruby/solrb/test/test_helper.rb+++ b/client/ruby/solrb/test/test_helper.rb@@ -10,8 +10,6 @@# See the License for the specific language governing permissions and# limitations under the License.-require 'test/unit'-def start_solr_serverDir.chdir(File.dirname(__FILE__) + '/../solr') doputs "starting solr server"