# File lib/email_spec/helpers.rb, line 46
    def current_email(address=nil)
      address = convert_address(address)
      email = address ? email_spec_hash[:current_emails][address] : email_spec_hash[:current_email]
      exception_class = if defined?(RSpec)
        RSpec::Expectations::ExpectationNotMetError
      else
        StandardError
      end
      raise exception_class, "Expected an open email but none was found. Did you forget to call open_email?" unless email
      email
    end