Sha256: 108b02d4da2625d6ab9b54f9b16d9bad387a60060f96b1ac36b57fb91cd00e1f
Contents?: true
Size: 921 Bytes
Versions: 11
Compression:
Stored size: 921 Bytes
Contents
require 'unit_spec_helper' describe Rpush, 'push' do before do Rpush::Daemon::Synchronizer.stub(sync: nil) Rpush::Daemon::AppRunner.stub(wait: nil) Rpush::Daemon::Feeder.stub(start: nil) end it 'sets the push config option to true' do Rpush.push Rpush.config.push.should be_true end it 'initializes the store' do Rpush::Daemon.should_receive(:initialize_store) Rpush.push end it 'syncs' do Rpush::Daemon::Synchronizer.should_receive(:sync) Rpush.push end it 'starts the feeder' do Rpush::Daemon::Feeder.should_receive(:start) Rpush.push end it 'stops on the app runner' do Rpush::Daemon::AppRunner.should_receive(:stop) Rpush.push end it 'overrides the default config options with those given as a hash' do Rpush.config.batch_size = 20 expect { Rpush.push(batch_size: 10) }.to change(Rpush.config, :batch_size).to(10) end end
Version data entries
11 entries across 11 versions & 1 rubygems