Sha256: fd10e1b149acf3bcd671b74a47a3586011b86471aebabd7d66312bdc8fe4ff9b
Contents?: true
Size: 896 Bytes
Versions: 1
Compression:
Stored size: 896 Bytes
Contents
require 'unit_spec_helper' describe Rpush, 'push' do before do Rpush::Daemon::AppRunner.stub(sync: nil, 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 the app runner' do Rpush::Daemon::AppRunner.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rpush-2.0.0.beta1 | spec/unit/push_spec.rb |