Sha256: 490715360ed5bf0cb74cd1af2859490e6bb9a29c5eaf87fe324fcde30365f489
Contents?: true
Size: 1.18 KB
Versions: 4
Compression:
Stored size: 1.18 KB
Contents
require File.expand_path('../../../../spec/helper', __FILE__) spec_precondition 'ruby-growl should be supported' do should.flunk if Ramaze::UNSUPPORTED_GEMS.include?('ruby-growl') end spec_require 'ruby-growl' spec_precondition 'Growl should be running' do begin growl = Ramaze::Logger::Growl.new growl.log(:info, 'Ramaze connection test') rescue should.flunk 'Growl is not running' end end require 'ramaze/log/growl' # Configure Growl, make sure your growl server matches # these settings. Ramaze::Logger::Growl.trait[:defaults][:name] = 'ramaze' Ramaze::Logger::Growl.trait[:defaults][:password] = 'ramaze' describe Ramaze::Logger::Growl do it 'Create a new instance of the Growl logger' do growl = Ramaze::Logger::Growl.new growl.should.respond_to? :log end it 'Send a growl notification' do growl = Ramaze::Logger::Growl.new growl.log(:info, 'Hello, Ramaze!') # The Growl library doesn't seem to return anything, # let's ask the user if the notification was sent print "Did you see the the notification? (y/n) " response = gets.strip response.should.satisfy do |object| object === 'y' or object === 'yes' end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ramaze-2012.04.14 | spec/ramaze/log/growl.rb |
ramaze-2012.03.07 | spec/ramaze/log/growl.rb |
ramaze-2011.12.28 | spec/ramaze/log/growl.rb |
ramaze-2011.10.23 | spec/ramaze/log/growl.rb |