Sha256: 789fd2459bca03cbc0259485a428d2000b813ad1d8f202b88b945579a1d1afe5
Contents?: true
Size: 887 Bytes
Versions: 2
Compression:
Stored size: 887 Bytes
Contents
require 'spec_helper' describe Notifiers do it { expect(growl).to be_instance_of(Notifiers::Growl) } it { expect(knotify).to be_instance_of(Notifiers::Knotify) } it { expect(notify_send).to be_instance_of(Notifiers::NotifySend) } it { expect(lib_notify).to be_instance_of(Notifiers::NotifySend) } describe '#auto_discover' do context 'when have a notifier library installed' do it 'returns the notifier' do expect(Notifiers::Growl).to receive(:installed?).and_return(true) expect(auto_discover).to be_instance_of(Notifiers::Growl) end end context 'when do not have a notifier library installed' do it 'raises Notifier not Found' do expect(Notifiers::Base).to receive(:subclasses).and_return([]) expect { auto_discover }.to raise_error(Notifiers::NotifierNotFound) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
notifiers-1.2.2 | spec/notifiers_spec.rb |
notifiers-1.2.1 | spec/notifiers_spec.rb |