Skip to content

Instantly share code, notes, and snippets.

@frsyuki
Created October 30, 2011 06:54
Show Gist options
  • Save frsyuki/1325610 to your computer and use it in GitHub Desktop.
Save frsyuki/1325610 to your computer and use it in GitHub Desktop.
diff --git a/lib/fluent/test/base.rb b/lib/fluent/test/base.rb
index 86b7baa..aa223f1 100644
--- a/lib/fluent/test/base.rb
+++ b/lib/fluent/test/base.rb
@@ -25,7 +25,8 @@ class TestDriver
def initialize(klass, &block)
if klass.is_a?(Class)
if block
- klass = Class.new(klass, &block)
+ klass = klass.dup
+ klass.module_eval(&block)
end
@instance = klass.new
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment