Skip to content

Commit

Permalink
Fix v0.14 test drivers to let plugin instance always have its class name
Browse files Browse the repository at this point in the history
  • Loading branch information
sonots committed Jul 25, 2016
1 parent c474488 commit bff7b38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fluent/test/driver/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def initialize(klass, opts: {}, &block)
if block
# Create new class for test w/ overwritten methods
# klass.dup is worse because its ancestors does NOT include original class name
klass_name = klass.name
klass = Class.new(klass)
klass.define_singleton_method("name") { klass_name }
klass.module_eval(&block)
end
@instance = klass.new
Expand Down

0 comments on commit bff7b38

Please sign in to comment.