Kouhei Sutou
null+****@clear*****
Tue Dec 17 23:42:01 JST 2013
Kouhei Sutou 2013-12-17 23:42:01 +0900 (Tue, 17 Dec 2013) New Revision: 6be6a9909b4aedb01406c8b1bb7ff7e783430cfb https://github.com/droonga/fluent-plugin-droonga/commit/6be6a9909b4aedb01406c8b1bb7ff7e783430cfb Message: Add stub distributor for testing Copied files: lib/droonga/test.rb (from test/unit/helper.rb) lib/droonga/test/stub_distributor.rb (from test/unit/helper.rb) Modified files: test/unit/helper.rb Copied: lib/droonga/test.rb (+3 -10) 73% =================================================================== --- test/unit/helper.rb 2013-12-17 22:18:28 +0900 (691466f) +++ lib/droonga/test.rb 2013-12-17 23:42:01 +0900 (d1f4fc7) @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright (C) 2013 Droonga Project # # This library is free software; you can redistribute it and/or @@ -13,13 +15,4 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -require_relative "helper/sandbox" -require_relative "helper/fixture" -require_relative "helper/stub_worker" -require_relative "helper/plugin_helper" -require_relative "helper/watch_helper" - -class Test::Unit::TestCase - include Sandbox - include Fixture -end +require "droonga/test/stub_distributor" Copied: lib/droonga/test/stub_distributor.rb (+14 -8) 73% =================================================================== --- test/unit/helper.rb 2013-12-17 22:18:28 +0900 (691466f) +++ lib/droonga/test/stub_distributor.rb 2013-12-17 23:42:01 +0900 (87927bb) @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright (C) 2013 Droonga Project # # This library is free software; you can redistribute it and/or @@ -13,13 +15,17 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -require_relative "helper/sandbox" -require_relative "helper/fixture" -require_relative "helper/stub_worker" -require_relative "helper/plugin_helper" -require_relative "helper/watch_helper" +module Droonga + module Test + class StubDistributor + attr_reader :messages + def initialize + @messages = [] + end -class Test::Unit::TestCase - include Sandbox - include Fixture + def distribute(message) + @messages << message + end + end + end end Modified: test/unit/helper.rb (+2 -0) =================================================================== --- test/unit/helper.rb 2013-12-17 22:18:28 +0900 (691466f) +++ test/unit/helper.rb 2013-12-17 23:42:01 +0900 (adb3d3d) @@ -13,6 +13,8 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +require "droonga/test" + require_relative "helper/sandbox" require_relative "helper/fixture" require_relative "helper/stub_worker" -------------- next part -------------- HTML����������������������������...Download