From 055a1f770373ce11c3f337835421fef5f4a3555f Mon Sep 17 00:00:00 2001 From: visionmedia Date: Tue, 20 Oct 2009 11:51:05 -0700 Subject: [PATCH] Specs for multiple options --- Readme.md | 14 ++++++++++++-- spec/spec.core.js | 7 +++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index f45de56..02130ac 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,17 @@ -# YourLib +# Growl for JavaScript (Rhino) -Description +lib/growl.js adds Growl support for the Rhino JavaScript engine. This is +essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). + +## Examples + + Growl.notify('You have mail!') + Growl.notify('5 new messages', { sticky: true }) + +## More Information + + * For in-depth documentation please view spec/spec.core.js ## License diff --git a/spec/spec.core.js b/spec/spec.core.js index e2ec39a..be46b38 100644 --- a/spec/spec.core.js +++ b/spec/spec.core.js @@ -116,5 +116,12 @@ describe 'Growl' args.should.eql ['growlnotify', '-m', '5 passes', '--icon', 'pdf'] end end + + describe 'given several options' + it 'should still work' + Growl.notify('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) + args.should.eql ['growlnotify', '-m', '5 new emails', '--appIcon', 'Safari', '--sticky', 'Email Client'] + end + end end end