parent
6d898496c8
commit
35490f3e37
|
@ -1,5 +1,6 @@
|
|||
<nav>
|
||||
<ul>
|
||||
<li><a href="index.html">Welcome</a></li>
|
||||
<li><a href="download.html">Download</a></li>
|
||||
<li><a href="release-notes.html">Release Notes</a></li>
|
||||
<li>Documentation</li>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<a href="http://github.com/pivotal/jasmine"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
||||
<div id="wrap" class="container_16">
|
||||
<header class="grid_16 alpha omega">
|
||||
<h1><a href="http://pivotal.github.com/jasmine"><img src="/jasmine/images/jasmine_logo.png" alt="Jasmine"/></a></h1>
|
||||
<h1><a href="/jasmine/"><img src="/jasmine/images/jasmine_logo.png" alt="Jasmine"/></a></h1>
|
||||
</header>
|
||||
<div class="clear"></div>
|
||||
<section class="grid_5 alpha">
|
||||
|
|
|
@ -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).
|
||||
|
||||
<table id="standalone-downloads">
|
||||
|
|
78
gem.html.md
78
gem.html.md
|
@ -2,4 +2,80 @@
|
|||
layout: default
|
||||
title: Using the Jasmine Gem
|
||||
---
|
||||
Coming soon...
|
||||
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.
|
||||
|
|
|
@ -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)
|
||||
__Discussion:__ [Google Group](http://groups.google.com/group/jasmine-js)<br/>
|
||||
__Group email:__ [jasmine-js@googlegroups.com](mailto:jasmine-js@googlegroups.com)<br/>
|
||||
__Current Build Status:__ [Jasmine at Pivotal Labs CI](http://ci.pivotallabs.com)<br/>
|
||||
__Report bugs__ at GitHub for [Jasmine core](http://github.com/pivotal/jasmine/issues) or [Ruby gem](http://github.com/pivotal/jasmine-gem/issues)<br/>
|
||||
__Project Backlog:__ [Jasmine on Pivotal Tracker](http://www.pivotaltracker.com/projects/10606)<br/>
|
||||
__Twitter:__ <img src="http://twitter-badges.s3.amazonaws.com/t_mini-c.png" alt=""/>[@JasmineBDD](http://twitter.com/JasmineBDD)<br/>
|
||||
|
|
|
@ -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: <a href="mailto:jasmine-js@googlegroups.com">jasmine-js@googlegroups.com</a>
|
||||
* 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.
|
||||
|
|
Loading…
Reference in New Issue