[Groonga-commit] ranguba/groonga-client-rails at 5065508 [master] Remove tests that are moved to groonga-client

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Dec 12 12:24:35 JST 2016


Kouhei Sutou	2016-12-12 12:24:35 +0900 (Mon, 12 Dec 2016)

  New Revision: 50655080c71d4a4a91070997c646ba4cde57530b
  https://github.com/ranguba/groonga-client-rails/commit/50655080c71d4a4a91070997c646ba4cde57530b

  Message:
    Remove tests that are moved to groonga-client

  Removed files:
    test/unit/searcher/select/filter_parameter_test.rb
    test/unit/searcher/select/match_columns_parameter_test.rb
    test/unit/searcher/select/output_columns_parameter_test.rb
    test/unit/searcher/select/sortby_parameter_test.rb
  Modified files:
    .travis.yml

  Modified: .travis.yml (+1 -1)
===================================================================
--- .travis.yml    2016-12-12 11:55:22 +0900 (af6f16d)
+++ .travis.yml    2016-12-12 12:24:35 +0900 (b6016ec)
@@ -21,7 +21,7 @@ install:
        BUNDLE_GEMFILE=${test_app}/Gemfile bundle install --jobs=3 --retry=3)
     done
 script:
-  - bundle exec ruby test/unit/run-test.rb
+#  - bundle exec ruby test/unit/run-test.rb
   - |
     for test_app in ${PWD}/test/apps/*
     do

  Deleted: test/unit/searcher/select/filter_parameter_test.rb (+0 -99) 100644
===================================================================
--- test/unit/searcher/select/filter_parameter_test.rb    2016-12-12 11:55:22 +0900 (2559705)
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright (C) 2016  Kouhei Sutou <kou �� clear-code.com>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-require "test_helper"
-
-class SearcherSelectFilterParameterTest < Test::Unit::TestCase
-  def filter_parameter(expression, values=nil)
-    Groonga::Client::Searcher::Select::FilterParameter.new(expression, values)
-  end
-
-  def to_parameters(expression, values=nil)
-    filter_parameter(expression, values).to_parameters
-  end
-
-  sub_test_case("expression") do
-    def test_nil
-      assert_equal({},
-                   to_parameters(nil))
-    end
-
-    def test_string
-      assert_equal({
-                     :filter => "age <= 20",
-                   },
-                   to_parameters("age <= 20"))
-    end
-
-    def test_empty_string
-      assert_equal({},
-                   to_parameters(""))
-    end
-  end
-
-  sub_test_case("values") do
-    def test_string
-      filter = <<-'FILTER'.strip
-title == "[\"He\\ llo\"]"
-      FILTER
-      assert_equal({
-                     :filter => filter,
-                   },
-                   to_parameters("title == %{value}",
-                                 :value => "[\"He\\ llo\"]"))
-    end
-
-    def test_symbol
-      assert_equal({
-                     :filter => "title == \"Hello\"",
-                   },
-                   to_parameters("title == %{value}",
-                                 :value => :Hello))
-    end
-
-    def test_number
-      assert_equal({
-                     :filter => "age <= 29",
-                   },
-                   to_parameters("age <= %{value}",
-                                 :value => 29))
-    end
-
-    def test_true
-      assert_equal({
-                     :filter => "published == true",
-                   },
-                   to_parameters("published == %{value}",
-                                 :value => true))
-    end
-
-    def test_false
-      assert_equal({
-                     :filter => "published == false",
-                   },
-                   to_parameters("published == %{value}",
-                                 :value => false))
-    end
-
-    def test_nil
-      assert_equal({
-                     :filter => "function(null)",
-                   },
-                   to_parameters("function(%{value})",
-                                 :value => nil))
-    end
-  end
-end

  Deleted: test/unit/searcher/select/match_columns_parameter_test.rb (+0 -59) 100644
===================================================================
--- test/unit/searcher/select/match_columns_parameter_test.rb    2016-12-12 11:55:22 +0900 (03ae32f)
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (C) 2016  Kouhei Sutou <kou �� clear-code.com>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-require "test_helper"
-
-class SearcherSelectMatchColumnsParameterTest < Test::Unit::TestCase
-  def match_columns_parameter(match_columns)
-    Groonga::Client::Searcher::Select::MatchColumnsParameter.new(match_columns)
-  end
-
-  def test_nil
-    assert_equal({},
-                 match_columns_parameter(nil).to_parameters)
-  end
-
-  def test_string
-    assert_equal({
-                   :match_columns => "title",
-                 },
-                 match_columns_parameter("title").to_parameters)
-  end
-
-  def test_empty_string
-    assert_equal({},
-                 match_columns_parameter("").to_parameters)
-  end
-
-  def test_symbol
-    assert_equal({
-                   :match_columns => "title",
-                 },
-                 match_columns_parameter(:title).to_parameters)
-  end
-
-  def test_array
-    assert_equal({
-                   :match_columns => "title, body",
-                 },
-                 match_columns_parameter(["title", "body"]).to_parameters)
-  end
-
-  def test_empty_array
-    assert_equal({},
-                 match_columns_parameter([]).to_parameters)
-  end
-end

  Deleted: test/unit/searcher/select/output_columns_parameter_test.rb (+0 -68) 100644
===================================================================
--- test/unit/searcher/select/output_columns_parameter_test.rb    2016-12-12 11:55:22 +0900 (2517bdd)
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright (C) 2016  Kouhei Sutou <kou �� clear-code.com>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-require "test_helper"
-
-class SearcherSelectOutputColumnsParameterTest < Test::Unit::TestCase
-  def output_columns_parameter(output_columns)
-    Groonga::Client::Searcher::Select::OutputColumnsParameter.new(output_columns)
-  end
-
-  def test_nil
-    assert_equal({},
-                 output_columns_parameter(nil).to_parameters)
-  end
-
-  def test_string
-    assert_equal({
-                   :output_columns => "title",
-                 },
-                 output_columns_parameter("title").to_parameters)
-  end
-
-  def test_empty_string
-    assert_equal({},
-                 output_columns_parameter("").to_parameters)
-  end
-
-  def test_symbol
-    assert_equal({
-                   :output_columns => "title",
-                 },
-                 output_columns_parameter(:title).to_parameters)
-  end
-
-  def test_array
-    assert_equal({
-                   :output_columns => "title, body",
-                 },
-                 output_columns_parameter(["title", "body"]).to_parameters)
-  end
-
-  def test_empty_array
-    assert_equal({},
-                 output_columns_parameter([]).to_parameters)
-  end
-
-  def test_function
-    parameter = output_columns_parameter(["title", "snippet_html(body)"])
-    assert_equal({
-                   :output_columns => "title, snippet_html(body)",
-                   :command_version => "2",
-                 },
-                 parameter.to_parameters)
-  end
-end

  Deleted: test/unit/searcher/select/sortby_parameter_test.rb (+0 -63) 100644
===================================================================
--- test/unit/searcher/select/sortby_parameter_test.rb    2016-12-12 11:55:22 +0900 (014f77e)
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2016  Kouhei Sutou <kou �� clear-code.com>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-require "test_helper"
-
-class SearcherSelectSortbyParameterTest < Test::Unit::TestCase
-  def sortby_parameter(sortby)
-    Groonga::Client::Searcher::Select::SortbyParameter.new(sortby)
-  end
-
-  def to_parameters(sortby)
-    sortby_parameter(sortby).to_parameters
-  end
-
-  def test_nil
-    assert_equal({},
-                 to_parameters(nil))
-  end
-
-  def test_string
-    assert_equal({
-                   :sortby => "-_score, _id",
-                 },
-                 to_parameters("-_score, _id"))
-  end
-
-  def test_empty_string
-    assert_equal({},
-                 to_parameters(""))
-  end
-
-  def test_symbol
-    assert_equal({
-                   :sortby => "_score",
-                 },
-                 to_parameters(:_score))
-  end
-
-  def test_array
-    assert_equal({
-                   :sortby => "-_score, _id",
-                 },
-                 to_parameters(["-_score", :_id]))
-  end
-
-  def test_empty_array
-    assert_equal({},
-                 to_parameters([]))
-  end
-end
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index