Sha256: 075c538eef2cb11d778b8ca6ffae081f2d794da891b4c1b1742c8bdab7a0a9ca

Contents?: true

Size: 804 Bytes

Versions: 37

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

37 entries across 37 versions & 2 rubygems

Version Path
rpush-9.1.0 spec/unit/push_spec.rb
rpush-9.0.0 spec/unit/push_spec.rb
rpush-8.0.0 spec/unit/push_spec.rb
rpush-7.0.1 spec/unit/push_spec.rb
rpush-7.0.0 spec/unit/push_spec.rb
rpush-6.0.1 spec/unit/push_spec.rb
rpush-6.0.0 spec/unit/push_spec.rb
rpush-5.4.0 spec/unit/push_spec.rb
rpush-5.3.0 spec/unit/push_spec.rb
rpush-5.2.0 spec/unit/push_spec.rb
rpush-5.1.0 spec/unit/push_spec.rb
rpush-5.0.0 spec/unit/push_spec.rb
rpush-4.2.0 spec/unit/push_spec.rb
rpush-4.1.1 spec/unit/push_spec.rb
rpush-4.1.0 spec/unit/push_spec.rb
rpush-4.0.1 spec/unit/push_spec.rb
rpush-4.0.0 spec/unit/push_spec.rb
rpush-3.3.1 spec/unit/push_spec.rb
rpush-3.3.0 spec/unit/push_spec.rb
rpush_extended-3.2.6 spec/unit/push_spec.rb