Sha256: 075c538eef2cb11d778b8ca6ffae081f2d794da891b4c1b1742c8bdab7a0a9ca

Contents?: true

Size: 804 Bytes

Versions: 38

Compression:

Stored size: 804 Bytes

Contents

require 'unit_spec_helper'

describe Rpush, 'push' do
  before do
    allow(Rpush::Daemon::Synchronizer).to receive_messages(sync: nil)
    allow(Rpush::Daemon::AppRunner).to receive_messages(wait: nil)
    allow(Rpush::Daemon::Feeder).to receive_messages(start: nil)
  end

  it 'sets the push config option to true' do
    Rpush.push
    expect(Rpush.config.push).to eq(true)
  end

  it 'initializes the daemon' do
    expect(Rpush::Daemon).to receive(:common_init)
    Rpush.push
  end

  it 'syncs' do
    expect(Rpush::Daemon::Synchronizer).to receive(:sync)
    Rpush.push
  end

  it 'starts the feeder' do
    expect(Rpush::Daemon::Feeder).to receive(:start)
    Rpush.push
  end

  it 'stops on the app runner' do
    expect(Rpush::Daemon::AppRunner).to receive(:stop)
    Rpush.push
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
rpush_extended-3.2.6 spec/unit/push_spec.rb
rpush_extended-3.2.5 spec/unit/push_spec.rb
rpush-3.2.4 spec/unit/push_spec.rb
rpush-3.2.3 spec/unit/push_spec.rb
rpush-3.2.2 spec/unit/push_spec.rb
rpush-3.2.1 spec/unit/push_spec.rb
rpush-3.2.0 spec/unit/push_spec.rb
rpush-3.1.1 spec/unit/push_spec.rb
rpush-3.1.0 spec/unit/push_spec.rb
rpush-3.0.2 spec/unit/push_spec.rb
rpush-3.0.1 spec/unit/push_spec.rb
rpush-3.0.0 spec/unit/push_spec.rb
rpush-3.0.0.rc1 spec/unit/push_spec.rb
rpush-2.7.0-java spec/unit/push_spec.rb
rpush-2.7.0 spec/unit/push_spec.rb
rpush-2.6.0-java spec/unit/push_spec.rb
rpush-2.6.0 spec/unit/push_spec.rb
rpush-2.5.0 spec/unit/push_spec.rb