diff --git a/_includes/toc.html b/_includes/toc.html index fbd053b..18f94f5 100644 --- a/_includes/toc.html +++ b/_includes/toc.html @@ -1,5 +1,6 @@ + Welcome Download Release Notes Documentation diff --git a/_layouts/default.html b/_layouts/default.html index c4dd271..5aabc01 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -15,7 +15,7 @@ - + diff --git a/download.html.md b/download.html.md index 700f2ea..ae82e61 100644 --- a/download.html.md +++ b/download.html.md @@ -7,7 +7,7 @@ These files are for the standalone release, meant for inclusion on a static HTML page and manual management of files. -For a using Jasmine with Ruby on Rails, other Ruby frameworks, within Continuous Integration environments, or to gain +For a using Jasmine with Ruby on Rails, other Ruby frameworks, within continuous integration environments, or to gain more dynamic source and test file loading, see [Using the Jasmine Gem](gem.html). diff --git a/gem.html.md b/gem.html.md index b56436c..8c5886b 100644 --- a/gem.html.md +++ b/gem.html.md @@ -2,4 +2,80 @@ layout: default title: Using the Jasmine Gem --- -Coming soon... \ No newline at end of file +It's easy to integrate Jasmine with your Ruby project. + +## Setup ## + +### For Rails 2 projects ### + +Install the Jasmine gem, add example specs to your project, and run them: +{% highlight sh %} +$ gem install jasmine +$ script/generate jasmine +$ rake spec +{% endhighlight %} + +### For Rails 3 projects ### + +Add jasmine to your Gemfile: +{% highlight ruby %} +gem "jasmine" +{% endhighlight %} + +Then update your gems, add example specs to your project, and run them: +{% highlight sh %} +$ bundle install +$ bundle exec jasmine init +{% endhighlight %} + +Better Rails 3/RSpec 2 support is coming soon! + +### For other Ruby projects ### + +Install the Jasmine gem, create an example project, and run your specs: + +{% highlight sh %} +$ gem install jasmine +$ jasmine init +$ rake jasmine:ci +{% endhighlight %} + +## Running specs ## + +The Jasmine gem provides two Rake tasks: + +{% highlight sh %} +$ rake jasmine +{% endhighlight %} + +This task starts a server which you can connect to through your browser and interactively run specs. + +{% highlight sh %} +$ rake jasmine:ci +{% endhighlight %} + +This task runs your Jasmine specs automatically (by launching Firefox, by default) and reports the result. + +When used with Rails 2, Jasmine gem creates a special RSpec spec which runs all your JavaScript specs and reports the +results as though they were Ruby specs. If you use a compatible IDE (such as RubyMine), you can navigate to the +JavaScript source for your specs directly from the spec runner interface. + +## CI/build integration ## + +The Jasmine gem makes it easy to include your Jasmine specs in your continuous integration build. If you are using +Rails 2, your Jasmine specs will automatically be included with other specs. Otherwise, you can explicitly run your +Jasmine specs like this: + +{% highlight sh %} +$ rake jasmine:ci +{% endhighlight %} + +## Configuration ## + +Customize spec/javascripts/support/jasmine.yml to enumerate the source files, stylesheets, and spec files you would +like the Jasmine runner to include. You may use dir glob strings. + +## Runner ## + +The Jasmine gem currently uses Selenium to launch a browser (Firefox by default) in order to run your specs. In the +future, we'll provide other options for running your specs. diff --git a/index.html.md b/index.html.md index 1a45e2c..03a712a 100644 --- a/index.html.md +++ b/index.html.md @@ -24,13 +24,14 @@ $ script/generate jasmine $ rake spec {% endhighlight %} -Jasmine can be run by on a static web page, on your Continuous Integration environment, or with [node.js](http://nodejs.org). +Jasmine can be run on a static web page, in your continuous integration environment, or with [node.js](http://nodejs.org). See more in the documentation. ## Support -__Discussion:__ [Google Group](http://groups.google.com/group/jasmine-js) -__Group email:__ [jasmine-js@googlegroups.com](mailto:jasmine-js@googlegroups.com) -__Current Build Status:__ [Jasmine at Pivotal Labs CI](http://ci.pivotallabs.com) -__Project Backlog:__ [Jasmine on Pivotal Tracker](http://www.pivotaltracker.com/projects/10606) -__Twitter:__ [@JasmineBDD](http://twitter.com/JasmineBDD) \ No newline at end of file +__Discussion:__ [Google Group](http://groups.google.com/group/jasmine-js) +__Group email:__ [jasmine-js@googlegroups.com](mailto:jasmine-js@googlegroups.com) +__Current Build Status:__ [Jasmine at Pivotal Labs CI](http://ci.pivotallabs.com) +__Report bugs__ at GitHub for [Jasmine core](http://github.com/pivotal/jasmine/issues) or [Ruby gem](http://github.com/pivotal/jasmine-gem/issues) +__Project Backlog:__ [Jasmine on Pivotal Tracker](http://www.pivotaltracker.com/projects/10606) +__Twitter:__ [@JasmineBDD](http://twitter.com/JasmineBDD) diff --git a/user-guide.html.md b/user-guide.html.md index bc93ab9..eeae232 100644 --- a/user-guide.html.md +++ b/user-guide.html.md @@ -10,32 +10,21 @@ title: Jasmine User Guide 2. Open `SpecRunner.html` in your favorite browser. ## Other distributions: -* For integration with the Ruby environment, including automated execution with Selenium, please use the [jasmine gem](http://github.com/pivotal/jasmine-gem). +* For integration with the Ruby environment, including automated execution with Selenium, please use the [jasmine gem](gem.html). # Which Release Should I Use? Please use the latest version unless you have a good reason not to. Some of this documentation may not be applicable to older versions. Please see [Release Notes](release-notes.html) for change information. -# How To - -There is a simple example of how to use Jasmine in the /example directory, but here's more information. - -## Support -We now have a Google Group for support & discussion. - -* Discussion: [http://groups.google.com/group/jasmine-js](http://groups.google.com/group/jasmine-js) -* Group email: jasmine-js@googlegroups.com -* Current build status of Jasmine is visible at [ci.pivotallabs.com](http://ci.pivotallabs.com) -* Pivotal Tracker project: [http://www.pivotaltracker.com/projects/10606](http://www.pivotaltracker.com/projects/10606) -* Twitter: [@JasmineBDD](http://twitter.com/JasmineBDD) - ## Maintainers -* [Davis W. Frank](mailto:dwfrank@pivotallabs.com), Pivotal Labs -* [Rajan Agaskar](mailto:rajan@pivotallabs.com), Pivotal Labs -* [Christian Williams](mailto:xian@pivotallabs.com), Pivotal Labs +* [Davis W. Frank](mailto:dwfrank@pivotallabs.com) ([infews](http://github.com/infews)), Pivotal Labs +* [Rajan Agaskar](mailto:rajan@pivotallabs.com) ([ragaskar](http://github.com/ragaskar)), Pivotal Labs +* [Christian Williams](mailto:xian@pivotallabs.com) ([Xian](http://github.com/Xian)), Pivotal Labs ## Developers -We welcome your contributions! Jasmine is currently maintained by Davis Frank ([infews](http://github.com/infews)), Rajan Agaskar ([ragaskar](http://github.com/ragaskar)), and Christian Williams ([Xian](http://github.com/Xian)). You can help us by removing all other recipients from your pull request. +We welcome your contributions! Just fork the GitHub project ([Jasmine core](http://github.com/pivotal/jasmine) or +[Ruby gem](http://github.com/pivotal/jasmine-gem)), and submit a pull request. Lots of extra points if you include +tests for your changes! ## Acknowledgments * A big shout out to the various JavaScript test framework authors, especially TJ for [JSpec](http://github.com/visionmedia/jspec/tree/master) - we played with it a bit before deciding that we really needed to roll our own.