Sha256: 93162e94780c94740f41236876c68e54a23a03c4b0efbd0bd8964d2964509dc9
Contents?: true
Size: 1015 Bytes
Versions: 2
Compression:
Stored size: 1015 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 'waits on the app runner' do Rpush::Daemon::AppRunner.should_receive(:wait) 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpush-1.0.0-java | spec/unit/push_spec.rb |
rpush-1.0.0 | spec/unit/push_spec.rb |