Module: EventMachine

Defined in:
lib/em-apn/server.rb,
lib/em-apn.rb,
lib/em-apn/client.rb,
lib/em-apn/version.rb,
lib/em-apn/response.rb,
lib/em-apn/connection.rb,
lib/em-apn/log_message.rb,
lib/em-apn/test_helper.rb,
lib/em-apn/notification.rb,
lib/em-apn/error_response.rb

Overview

Test helper for EM::APN

To use this, start by simply requiring this file after EM::APN has already been loaded

require "em-apn"
require "em-apn/test_helper"

This will nullify actual deliveries and instead, push them onto an accessible list:

expect {
  client.deliver('notification)
}.to change { EM::APN.deliveries.size }.by(1)

notification = EM::APN.deliveries.first
notification.should be_an_instance_of(EM::APN::Notification)
notification.payload.should == ...

Defined Under Namespace

Modules: APN