lib/mack-notifier/testing.rb in mack-notifier-0.7.0.1 vs lib/mack-notifier/testing.rb in mack-notifier-0.7.1

- old
+ new

@@ -1,11 +1,13 @@ if Mack.env == "test" + alias_deprecated_method :delivered_emails, :delivered_notifiers, '0.7.1', '0.8.0' + # Used for testing this method will return any emails that have been 'sent' using Mack::Notifier::DeliveryHandlers::Test. # These emails will get 'flushed' after each test. - def delivered_emails - Mack::Notifier::DeliveryHandlers::Test::EmailRegistry.registered_items + def delivered_notifiers + Mack::Notifier::DeliveryHandlers::Test::NotifierRegistry.registered_items end module Spec # :nodoc: module Example # :nodoc: module ExampleMethods # :nodoc: @@ -14,11 +16,11 @@ alias_method :email_spec_execute, :execute def execute(options, instance_variables) @__res = email_spec_execute(options, instance_variables) - Mack::Notifier::DeliveryHandlers::Test::EmailRegistry.reset! + Mack::Notifier::DeliveryHandlers::Test::NotifierRegistry.reset! @__res end end # ExampleMethods end # Example @@ -34,10 +36,10 @@ # We need to wrap the run method so we can do things like # run a cleanup method if it exists def run(result, &progress_block) # :nodoc: @__res = super_run(result) - Mack::Notifier::DeliveryHandlers::Test::EmailRegistry.reset! + Mack::Notifier::DeliveryHandlers::Test::NotifierRegistry.reset! @__res end end # TestCase end # Unit \ No newline at end of file