[Groonga-commit] groonga/groonga-query-log at 6b860ee [master] test: indent

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Sep 24 11:47:52 JST 2013


Kouhei Sutou	2013-09-24 11:47:52 +0900 (Tue, 24 Sep 2013)

  New Revision: 6b860ee74ff219e1f029ace87a2a59a7c3ea2376
  https://github.com/groonga/groonga-query-log/commit/6b860ee74ff219e1f029ace87a2a59a7c3ea2376

  Message:
    test: indent

  Modified files:
    test/test-replayer.rb

  Modified: test/test-replayer.rb (+32 -32)
===================================================================
--- test/test-replayer.rb    2013-09-24 11:47:31 +0900 (844b2f2)
+++ test/test-replayer.rb    2013-09-24 11:47:52 +0900 (aed27d8)
@@ -19,43 +19,43 @@
 class ReplayerTest < Test::Unit::TestCase
   class OptionTest < self
     class ClientTest < self
-    def setup
-      @options = Groonga::QueryLog::Replayer::Options.new
-      @options.n_clients = 1
-    end
+      def setup
+        @options = Groonga::QueryLog::Replayer::Options.new
+        @options.n_clients = 1
+      end
 
-    def test_host
-      host = "example.com"
-      @options.host = host
-      mock_client_open(:host => host)
-      replay
-    end
+      def test_host
+        host = "example.com"
+        @options.host = host
+        mock_client_open(:host => host)
+        replay
+      end
 
-    def test_port
-      port = 2929
-      @options.port = 2929
-      mock_client_open(:port => 2929)
-      replay
-    end
+      def test_port
+        port = 2929
+        @options.port = 2929
+        mock_client_open(:port => 2929)
+        replay
+      end
 
-    private
-    def replay
-      replayer = Groonga::QueryLog::Replayer.new(@options)
-      replayer.replay(StringIO.new(""))
-    end
+      private
+      def replay
+        replayer = Groonga::QueryLog::Replayer.new(@options)
+        replayer.replay(StringIO.new(""))
+      end
 
-    def mock_client_open(expected_options)
-      client = Object.new
-      default_options = {
-        :host     => "127.0.0.1",
-        :port     => 10041,
-        :protocol => :gqtp,
-      }
-      expected_open_options = default_options.merge(expected_options)
-      mock(Groonga::Client).open(expected_open_options).yields(client) do
-        client
+      def mock_client_open(expected_options)
+        client = Object.new
+        default_options = {
+          :host     => "127.0.0.1",
+          :port     => 10041,
+          :protocol => :gqtp,
+        }
+        expected_open_options = default_options.merge(expected_options)
+        mock(Groonga::Client).open(expected_open_options).yields(client) do
+          client
+        end
       end
     end
-    end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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