test/plugin/test_out_twilio.rb in fluent-plugin-twilio-0.0.3 vs test/plugin/test_out_twilio.rb in fluent-plugin-twilio-0.1.0

- old
+ new

@@ -9,12 +9,12 @@ account_sid TWILIO_ACCOUNT_SID auth_token TWILIO_AUTH_TOKEN from_number +8112345678 ] - def create_driver(conf=CONFIG,tag='test') - Fluent::Test::OutputTestDriver.new(Fluent::TwilioOutput, tag).configure(conf) + def create_driver(conf=CONFIG) + Fluent::Test::Driver::Output.new(Fluent::Plugin::TwilioOutput).configure(conf) end def test_configure assert_raise(Fluent::ConfigError) { d = create_driver('') @@ -42,14 +42,14 @@ assert_equal '+81123456789,+811234567890', d.instance.default_number end def test_emit - d1 = create_driver(CONFIG, 'notify.call') - d1.run do - d1.emit({'message' => 'hello world.'}) + d1 = create_driver(CONFIG) + d1.run(default_tag: 'notify.call') do + d1.feed({'message' => 'hello world.'}) end - emits = d1.emits - assert_equal 0, emits.length + events = d1.events + assert_equal 0, events.length end end