Sha256: be306ee069337536ad6f83c35642ba0a512d8f4183d99d0702a47c6e25baabad

Contents?: true

Size: 419 Bytes

Versions: 4

Compression:

Stored size: 419 Bytes

Contents

require 'spec_helper'
require 'grocer/pusher'

describe Grocer::Pusher do
  let(:connection) { stub_everything }

  subject { described_class.new(connection) }

  describe '#push' do
    it 'serializes a notification and sends it via the connection' do
      notification = stub(:to_bytes => 'abc123')
      subject.push(notification)

      expect(connection).to have_received(:write).with('abc123')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
grocer-0.7.1 spec/grocer/pusher_spec.rb
grocer-0.7.0 spec/grocer/pusher_spec.rb
grocer-0.6.1 spec/grocer/pusher_spec.rb
grocer-0.6.0 spec/grocer/pusher_spec.rb