lib/mack-notifier/testing.rb in mack-notifier-0.7.1.1 vs lib/mack-notifier/testing.rb in mack-notifier-0.8.0
- old
+ new
@@ -1,9 +1,7 @@
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_notifiers
Mack::Notifier::DeliveryHandlers::Test::NotifierRegistry.registered_items
end
@@ -11,13 +9,13 @@
module Spec # :nodoc:
module Example # :nodoc:
module ExampleMethods # :nodoc:
include Mack::Routes::Urls
include Mack::Testing::Helpers
+
+ alias_instance_method :execute, :email_spec_execute
- alias_method :email_spec_execute, :execute
-
def execute(options, instance_variables)
@__res = email_spec_execute(options, instance_variables)
Mack::Notifier::DeliveryHandlers::Test::NotifierRegistry.reset!
@__res
end
@@ -30,10 +28,10 @@
module Unit # :nodoc:
class TestCase # :nodoc:
# Let's alias the run method in the class above us so we can create a new one here
# but still reference it.
- alias_method :super_run, :run # :nodoc:
+ alias_instance_method :run, :super_run
# 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)
\ No newline at end of file