Kouhei Sutou
null+****@clear*****
Tue Mar 22 18:36:55 JST 2016
Kouhei Sutou 2016-03-22 18:36:55 +0900 (Tue, 22 Mar 2016) New Revision: a3bcbf78a27b089949bf8d3f5baa7dfe08caf2a9 https://github.com/ranguba/groonga-client-rails/commit/a3bcbf78a27b089949bf8d3f5baa7dfe08caf2a9 Message: test: use groonga-client-rails Added files: test/fixtures/rails4-mongoid/app/searchers/application_searcher.rb test/fixtures/rails4-mongoid/app/searchers/posts_searcher.rb Modified files: test/fixtures/rails4-mongoid/Gemfile.lock test/fixtures/rails4-mongoid/app/models/post.rb test/fixtures/rails4-mongoid/test/controllers/posts_controller_test.rb test/fixtures/rails4-mongoid/test/models/post_test.rb test/fixtures/rails4-mongoid/test/test_helper.rb Modified: test/fixtures/rails4-mongoid/Gemfile.lock (+6 -4) =================================================================== --- test/fixtures/rails4-mongoid/Gemfile.lock 2016-03-22 18:36:31 +0900 (af0b486) +++ test/fixtures/rails4-mongoid/Gemfile.lock 2016-03-22 18:36:55 +0900 (19d7423) @@ -2,7 +2,7 @@ PATH remote: ../../../ specs: groonga-client-rails (1.0.0) - groonga-client + groonga-client (>= 0.2.3) rails GEM @@ -68,11 +68,13 @@ GEM globalid (0.3.6) activesupport (>= 4.1.0) gqtp (1.0.6) - groonga-client (0.1.9) + groonga-client (0.2.3) gqtp (>= 1.0.4) - groonga-command (>= 1.0.8) - groonga-command (1.1.7) + groonga-command (>= 1.2.0) + hashie + groonga-command (1.2.0) json + hashie (3.4.3) i18n (0.7.0) jbuilder (2.4.1) activesupport (>= 3.0.0, < 5.1) Modified: test/fixtures/rails4-mongoid/app/models/post.rb (+2 -0) =================================================================== --- test/fixtures/rails4-mongoid/app/models/post.rb 2016-03-22 18:36:31 +0900 (f04075b) +++ test/fixtures/rails4-mongoid/app/models/post.rb 2016-03-22 18:36:55 +0900 (5023637) @@ -3,4 +3,6 @@ class Post include Mongoid::Timestamps field :title, type: String field :body, type: String + + # PostsSearcher.add_source(self, columns: [:title, :body, :updated_at]) end Added: test/fixtures/rails4-mongoid/app/searchers/application_searcher.rb (+2 -0) 100644 =================================================================== --- /dev/null +++ test/fixtures/rails4-mongoid/app/searchers/application_searcher.rb 2016-03-22 18:36:55 +0900 (457c4d6) @@ -0,0 +1,2 @@ +class ApplicationSearcher < Groonga::Client::Searcher +end Added: test/fixtures/rails4-mongoid/app/searchers/posts_searcher.rb (+16 -0) 100644 =================================================================== --- /dev/null +++ test/fixtures/rails4-mongoid/app/searchers/posts_searcher.rb 2016-03-22 18:36:55 +0900 (7919a39) @@ -0,0 +1,16 @@ +class PostsSearcher < ApplicationSearcher + schema.column :title, { + type: "ShortText", + index: true, + index_type: :full_text_search, + } + schema.column :body, { + type: "Text", + index: true, + index_type: :full_text_search, + } + schema.column :updated_at, { + type: "Time", + index: true, + } +end Modified: test/fixtures/rails4-mongoid/test/controllers/posts_controller_test.rb (+2 -0) =================================================================== --- test/fixtures/rails4-mongoid/test/controllers/posts_controller_test.rb 2016-03-22 18:36:31 +0900 (a8fbf2a) +++ test/fixtures/rails4-mongoid/test/controllers/posts_controller_test.rb 2016-03-22 18:36:55 +0900 (11247aa) @@ -1,6 +1,8 @@ require 'test_helper' class PostsControllerTest < ActionController::TestCase + include Groonga::Client::Rails::Fixture + setup do @post = create(:post) end Modified: test/fixtures/rails4-mongoid/test/models/post_test.rb (+2 -0) =================================================================== --- test/fixtures/rails4-mongoid/test/models/post_test.rb 2016-03-22 18:36:31 +0900 (6d9d463) +++ test/fixtures/rails4-mongoid/test/models/post_test.rb 2016-03-22 18:36:55 +0900 (389b2a6) @@ -1,6 +1,8 @@ require 'test_helper' class PostTest < ActiveSupport::TestCase + include Groonga::Client::Rails::Fixture + # test "the truth" do # assert true # end Modified: test/fixtures/rails4-mongoid/test/test_helper.rb (+1 -0) =================================================================== --- test/fixtures/rails4-mongoid/test/test_helper.rb 2016-03-22 18:36:31 +0900 (2d79611) +++ test/fixtures/rails4-mongoid/test/test_helper.rb 2016-03-22 18:36:55 +0900 (7031985) @@ -1,6 +1,7 @@ ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' +require 'groonga/client/rails/test_help' class ActiveSupport::TestCase # Add more helper methods to be used by all tests here... -------------- next part -------------- HTML����������������������������...Download