Sha256: 5a878303fa9a5396f57b5196f5bc158269ff66923e35a48c5cc3e7e90e08b2e7
Contents?: true
Size: 747 Bytes
Versions: 2
Compression:
Stored size: 747 Bytes
Contents
require 'spec_helper' describe Feedbook::Listener do subject { Feedbook::Listener } describe '#start' do let(:configuration) { double } let(:feeds) { [double, double, double] } before :each do allow(configuration).to receive(:interval).and_return(300) allow(subject).to receive(:load_configuration).with('feedbook.yml').and_return([feeds, configuration]) end it 'parses hash and creates Feed instance' do allow(configuration).to receive(:load_notifiers) feeds.each do |feed| expect(feed).to receive(:fetch) expect(feed).to receive(:valid?) end expect(Object).to receive(:every).with(300).and_return(300) subject.start('feedbook.yml') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
feedbook-0.9.1 | spec/unit/lib/listener_spec.rb |
feedbook-0.9.0 | spec/unit/lib/listener_spec.rb |