Sha256: dd17b0544ff679dec97c96304c50331af820745227cc17bc3913e1ae97408e7a
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 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') Growl.should_receive(:new).with('localhost', 'uniform_notifier', ['uniform_notifier'], nil, nil).and_return(growl) 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') Growl.should_receive(:new).with('localhost', 'uniform_notifier', ['uniform_notifier'], nil, '123456').and_return(growl) 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
uniform_notifier-1.0.1 | spec/uniform_notifier/growl_spec.rb |