Sha256: 75a66284f210eaa40023b60e30f6dbfeb8bda0d8674565e38d0094a86ea0d274
Contents?: true
Size: 1.5 KB
Versions: 2
Compression:
Stored size: 1.5 KB
Contents
require 'spec_helper' describe UniformNotifier::Growl do it "should not notify growl" do UniformNotifier::Growl.out_of_channel_notify('notify growl').should be_nil end it "should notify growl without password" do growl = double('growl', :is_a? => true) Growl.should_receive(:new).with('localhost', 'uniform_notifier').and_return(growl) growl.should_receive(:add_notification).with('uniform_notifier') growl.should_receive(:password=).with(nil) growl.should_receive(:notify).with('uniform_notifier', 'Uniform Notifier', 'Uniform Notifier Growl has been turned on').ordered growl.should_receive(:notify).with('uniform_notifier', 'Uniform Notifier', 'notify growl without password').ordered UniformNotifier.growl = true UniformNotifier::Growl.out_of_channel_notify('notify growl without password') end it "should notify growl with password" do growl = double('growl', :is_a? => true) Growl.should_receive(:new).with('localhost', 'uniform_notifier').and_return(growl) growl.should_receive(:add_notification).with('uniform_notifier') growl.should_receive(:password=).with('123456') growl.should_receive(:notify).with('uniform_notifier', 'Uniform Notifier', 'Uniform Notifier Growl has been turned on').ordered growl.should_receive(:notify).with('uniform_notifier', 'Uniform Notifier', 'notify growl with password').ordered UniformNotifier.growl = { :password => '123456' } UniformNotifier::Growl.out_of_channel_notify('notify growl with password') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
uniform_notifier-1.4.0 | spec/uniform_notifier/growl_spec.rb |
uniform_notifier-1.3.0 | spec/uniform_notifier/growl_spec.rb |