Big refactor of GH-PAGES. Now with happy layout-ness
This commit is contained in:
parent
ce86a96b3a
commit
0f86dbb31c
|
@ -1 +1,2 @@
|
|||
.idea/
|
||||
_site/
|
|
@ -0,0 +1,49 @@
|
|||
<nav>
|
||||
<ul>
|
||||
<li><a href="download.html">Download</a></li>
|
||||
<li><a href="release-notes.html">Release Notes</a></li>
|
||||
<li>Documentation</li>
|
||||
<ul>
|
||||
<li><a href="user-guide.html">User Guide</a></li>
|
||||
<li><a href="background.html">Background</a></li>
|
||||
<li><a href="suites-and-specs.html">Suites and Specs</a></li>
|
||||
<li><a href="matchers.html">Matchers</a></li>
|
||||
<li><a href="before-and-after.html">Before and After</a></li>
|
||||
<li><a href="spies.html">Spies</a></li>
|
||||
<li><a href="async.html">Asynchronous Specs</a></li>
|
||||
</ul>
|
||||
<li><a href="gem.html">Using the Jasmine Gem</a></li>
|
||||
<li><a href="jsdoc/index.html">API Documentation</a></li>
|
||||
<li><a href="http://github.com/pivotal/jasmine#README">Contributor Guide</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<script>
|
||||
new TWTR.Widget({
|
||||
version: 2,
|
||||
type: 'profile',
|
||||
rpp: 10,
|
||||
interval: 6000,
|
||||
width: 250,
|
||||
height: 300,
|
||||
theme: {
|
||||
shell: {
|
||||
background: '#333333',
|
||||
color: '#ffffff'
|
||||
},
|
||||
tweets: {
|
||||
background: '#e4e4e2',
|
||||
color: '#444444',
|
||||
links: '#216604'
|
||||
}
|
||||
},
|
||||
features: {
|
||||
scrollbar: false,
|
||||
loop: false,
|
||||
live: true,
|
||||
hashtags: true,
|
||||
timestamp: true,
|
||||
avatars: true,
|
||||
behavior: 'all'
|
||||
}
|
||||
}).render().setUser('jasminebdd').start();
|
||||
</script>
|
|
@ -1,87 +1,50 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta name="google-site-verification" content="TbQkaged6NgckZSPt_kq6JyBx9URJS7GQQjZrqHJjwU" />
|
||||
|
||||
<title>{{ page.title }}</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin-top: 1.0em;
|
||||
background-color: #ffffff;
|
||||
font-family: Helvetica, Arial, FreeSans, sans-serif;
|
||||
color: #000000;
|
||||
}
|
||||
#container {
|
||||
margin: 0 auto;
|
||||
width: 800px;
|
||||
}
|
||||
h1 { font-size: 3.8em; color: #000000; margin-bottom: 3px; }
|
||||
h1 .small { font-size: 0.4em; }
|
||||
h1 a { text-decoration: none }
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
padding-top: 1em;
|
||||
color: #000000;
|
||||
border-top: 4px solid #E0E0E0;
|
||||
}
|
||||
h3 { color: #000000; }
|
||||
a { color: #000000; }
|
||||
.description { font-size: 1.2em; margin-top: 50px; font-style: italic; float: right; text-align: right; }
|
||||
.download { float: right; }
|
||||
pre { background: #eff3e3; border: 3px solid black; color: #000; padding: 15px; }
|
||||
hr { border: 15px solid #7ac142; clear: both; }
|
||||
.footer { text-align:center; padding-top:30px; font-style: italic; }
|
||||
table { border-collapse: collapse; width: 100% }
|
||||
table th, table td { border: 1px solid #aaa; padding: .2em; }
|
||||
table td { white-space:nowrap; }
|
||||
#standalone-downloads td { font-family: monospace; }
|
||||
#standalone-downloads td.sha { font-size: 0.8em; }
|
||||
#standalone-downloads .rc td { background-color: #ddd; }
|
||||
</style>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<title>{% if page.title %} {{ page.title }} | {% endif %} {{site.title}}</title>
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="js/html5.js"/>
|
||||
<![endif]-->
|
||||
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
|
||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="css/screen.css"/>
|
||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="css/pygments.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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="container">
|
||||
|
||||
<div class="description">
|
||||
Simple DOM-less
|
||||
<br/>JavaScript testing framework
|
||||
</div>
|
||||
|
||||
<h1><a href="http://pivotal.github.com/jasmine"><img src="images/jasmine_logo.png" alt="Jasmine"/></a></h1>
|
||||
|
||||
<hr style="clear: both;"/>
|
||||
|
||||
{{ content }}
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="footer">
|
||||
get the source code on GitHub : <a href="http://github.com/pivotal/jasmine">pivotal/jasmine</a>
|
||||
</div>
|
||||
|
||||
<div id="wrap" class="container_12">
|
||||
<header class="grid_12 alpha omega">
|
||||
<h1><a href="http://pivotal.github.com/jasmine"><img src="images/jasmine_logo.png" alt="Jasmine"/></a></h1>
|
||||
</header>
|
||||
<div class="clear"></div>
|
||||
<section class="grid_4 alpha">
|
||||
{% capture toc %} {% include toc.html %} {% endcapture %}
|
||||
{{ toc | textilize }}
|
||||
</section>
|
||||
<section class="grid_8 omega">
|
||||
{{ content }}
|
||||
</section>
|
||||
<div class="clear"></div>
|
||||
<footer>
|
||||
<div class="grid_12 alpha omega">
|
||||
<span class="small">Powered by
|
||||
<a href="http://pivotallabs.com/">
|
||||
<img src="images/pivotal_logo.gif" alt="Pivotal Labs, Inc."/>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var pageTracker = _gat._getTracker("{{site.analytics_id}}");
|
||||
pageTracker._trackPageview();
|
||||
</script>
|
||||
</footer>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-17547473-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
<!-- .container_12 -->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: default
|
||||
title: Asynchronous Specs with Jasmine
|
||||
---
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: default
|
||||
title: Jasmine Background & History
|
||||
---
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: default
|
||||
title: Before and After a Jasmine Spec
|
||||
---
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
|
|
@ -0,0 +1 @@
|
|||
body{font:13px/1.5 'Helvetica Neue',Arial,'Liberation Sans',FreeSans,sans-serif}a:focus{outline:1px dotted}hr{border:0 #ccc solid;border-top-width:1px;clear:both;height:0}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}ul{list-style:disc}li{margin-left:30px}p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset{margin-bottom:20px}
|
|
@ -0,0 +1,62 @@
|
|||
code .hll { background-color: #ffffcc }
|
||||
code { background: #ffffff; }
|
||||
code .c { color: #808080 } /* Comment */
|
||||
code .err { color: #F00000; background-color: #F0A0A0 } /* Error */
|
||||
code .k { color: #008000; font-weight: bold } /* Keyword */
|
||||
code .o { color: #303030 } /* Operator */
|
||||
code .cm { color: #808080 } /* Comment.Multiline */
|
||||
code .cp { color: #507090 } /* Comment.Preproc */
|
||||
code .c1 { color: #808080 } /* Comment.Single */
|
||||
code .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
|
||||
code .gd { color: #A00000 } /* Generic.Deleted */
|
||||
code .ge { font-style: italic } /* Generic.Emph */
|
||||
code .gr { color: #FF0000 } /* Generic.Error */
|
||||
code .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
code .gi { color: #00A000 } /* Generic.Inserted */
|
||||
code .go { color: #808080 } /* Generic.Output */
|
||||
code .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
||||
code .gs { font-weight: bold } /* Generic.Strong */
|
||||
code .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
code .gt { color: #0040D0 } /* Generic.Traceback */
|
||||
code .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
|
||||
code .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
|
||||
code .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
|
||||
code .kp { color: #003080; font-weight: bold } /* Keyword.Pseudo */
|
||||
code .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
|
||||
code .kt { color: #303090; font-weight: bold } /* Keyword.Type */
|
||||
code .m { color: #6000E0; font-weight: bold } /* Literal.Number */
|
||||
code .s { background-color: #fff0f0 } /* Literal.String */
|
||||
code .na { color: #0000C0 } /* Name.Attribute */
|
||||
code .nb { color: #007020 } /* Name.Builtin */
|
||||
code .nc { color: #B00060; font-weight: bold } /* Name.Class */
|
||||
code .no { color: #003060; font-weight: bold } /* Name.Constant */
|
||||
code .nd { color: #505050; font-weight: bold } /* Name.Decorator */
|
||||
code .ni { color: #800000; font-weight: bold } /* Name.Entity */
|
||||
code .ne { color: #F00000; font-weight: bold } /* Name.Exception */
|
||||
code .nf { color: #0060B0; font-weight: bold } /* Name.Function */
|
||||
code .nl { color: #907000; font-weight: bold } /* Name.Label */
|
||||
code .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
|
||||
code .nt { color: #007000 } /* Name.Tag */
|
||||
code .nv { color: #906030 } /* Name.Variable */
|
||||
code .ow { color: #000000; font-weight: bold } /* Operator.Word */
|
||||
code .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
code .mf { color: #6000E0; font-weight: bold } /* Literal.Number.Float */
|
||||
code .mh { color: #005080; font-weight: bold } /* Literal.Number.Hex */
|
||||
code .mi { color: #0000D0; font-weight: bold } /* Literal.Number.Integer */
|
||||
code .mo { color: #4000E0; font-weight: bold } /* Literal.Number.Oct */
|
||||
code .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
|
||||
code .sc { color: #0040D0 } /* Literal.String.Char */
|
||||
code .sd { color: #D04020 } /* Literal.String.Doc */
|
||||
code .s2 { background-color: #fff0f0 } /* Literal.String.Double */
|
||||
code .se { color: #606060; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
|
||||
code .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
|
||||
code .si { background-color: #e0e0e0 } /* Literal.String.Interpol */
|
||||
code .sx { color: #D02000; background-color: #fff0f0 } /* Literal.String.Other */
|
||||
code .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
|
||||
code .s1 { background-color: #fff0f0 } /* Literal.String.Single */
|
||||
code .ss { color: #A06000 } /* Literal.String.Symbol */
|
||||
code .bp { color: #007020 } /* Name.Builtin.Pseudo */
|
||||
code .vc { color: #306090 } /* Name.Variable.Class */
|
||||
code .vg { color: #d07000; font-weight: bold } /* Name.Variable.Global */
|
||||
code .vi { color: #3030B0 } /* Name.Variable.Instance */
|
||||
code .il { color: #0000D0; font-weight: bold } /* Literal.Number.Integer.Long */
|
|
@ -0,0 +1,140 @@
|
|||
@import url("960gs/960.css");
|
||||
|
||||
/* http://www.levien.com/type/myfonts/inconsolata.html */
|
||||
@font-face
|
||||
{
|
||||
font-family: "inconsolata";
|
||||
src: url("../fonts/inconsolata.otf");
|
||||
}
|
||||
|
||||
@font-face
|
||||
{
|
||||
font-family: "droid sans";
|
||||
src: url("../fonts/droidsans.ttf");
|
||||
}
|
||||
@font-face
|
||||
{
|
||||
font-family: "droid sans bold";
|
||||
src: url("../fonts/droidsans-bold.ttf");
|
||||
}
|
||||
body
|
||||
{
|
||||
color:#333;
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-size:87.5%; /* 16px * 0.875 = 14px */
|
||||
line-height: 137.5%; /* 16px * 1.375 = 22px */
|
||||
}
|
||||
a
|
||||
{
|
||||
color: #55862e;
|
||||
text-decoration: none;
|
||||
border-bottom: solid 1px #3030a2;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
text-decoration: none;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
a:visited{
|
||||
color: #777;
|
||||
border-bottom: solid 1px #ccc;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6
|
||||
{
|
||||
color: #000;
|
||||
}
|
||||
h1, h2, h3
|
||||
{
|
||||
font-family: "droid sans", helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
h4, h5, h6
|
||||
{
|
||||
font-family: "droid sans bold", helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 150.0%;
|
||||
}
|
||||
h2
|
||||
{
|
||||
font-size: 137.5%;
|
||||
}
|
||||
h3
|
||||
{
|
||||
font-size: 125.0%;
|
||||
}
|
||||
h4
|
||||
{
|
||||
font-size: 112.5%;
|
||||
}
|
||||
h5, h6{
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
pre,code
|
||||
{
|
||||
font-family: "inconsolata", monospace;
|
||||
/* font-size: 1.142em; */
|
||||
}
|
||||
|
||||
.noul
|
||||
{
|
||||
border-bottom: 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
img.screenshot {
|
||||
padding-left: 35px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
header, footer
|
||||
{
|
||||
display: block;
|
||||
padding: .1em 0;
|
||||
}
|
||||
|
||||
|
||||
header h1{
|
||||
font-size:1.142em;
|
||||
}
|
||||
|
||||
header h1 a, header h1 a:visited
|
||||
{
|
||||
color:#55862e;
|
||||
text-decoration: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
footer{
|
||||
margin-top:1em;
|
||||
border-top: solid 3px #ccc;
|
||||
}
|
||||
|
||||
footer img {
|
||||
vertical-align: middle;
|
||||
height: 59px;
|
||||
}
|
||||
.twtr-widget a,
|
||||
.twtr-widget a:visited,
|
||||
footer a,
|
||||
footer a:visited {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
ul.posts
|
||||
{
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
nav {
|
||||
margin-bottom: 25px;
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
layout: default
|
||||
title: Jasmine Downloads
|
||||
---
|
||||
|
||||
## Downloads
|
||||
|
||||
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
|
||||
more dynamic source and test file loading, see [Using the Jasmine Gem](gem.html).
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Version</th>
|
||||
<th>Size</th>
|
||||
<th>Date</th>
|
||||
<th>SHA1</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="link"><a href='downloads/jasmine-standalone-1.0.0.zip'>jasmine-standalone-1.0.0.zip</a></td>
|
||||
<td class="version">1.0.0</td>
|
||||
<td class="size">20k</td>
|
||||
<td class="date">2010/09/14 12:54:38 PDT</td>
|
||||
<td class="sha">1866f654a3ad0ab9109393ce31d6613c77916607</td>
|
||||
</tr>
|
||||
<tr class="rc">
|
||||
<td class="link"><a href='downloads/jasmine-standalone-1.0.0.rc1.zip'>jasmine-standalone-1.0.0.rc1.zip</a></td>
|
||||
<td class="version">1.0.0.rc1</td>
|
||||
<td class="size">19k</td>
|
||||
<td class="date">2010/08/26 13:09:41 PDT</td>
|
||||
<td class="sha">20e7da22bc7ce3433331a5ad44eb199f4ff34065</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="link"><a href='downloads/jasmine-standalone-0.11.1.zip'>jasmine-standalone-0.11.1.zip</a></td>
|
||||
<td class="version">0.11.1</td>
|
||||
<td class="size">18k</td>
|
||||
<td class="date">2010/06/25 16:05:30 PDT</td>
|
||||
<td class="sha">26998c7ca047e47f84c382a4efeb1dc5cb8661a6</td>
|
||||
</tr>
|
||||
</table>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: default
|
||||
title: Using the Jasmine Gem
|
||||
---
|
75
index.html
75
index.html
|
@ -1,75 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
title: "Jasmine: Javascript Testing Framework"
|
||||
---
|
||||
<style type="text/css">
|
||||
h2 { border-top: none; }
|
||||
</style>
|
||||
<pre>
|
||||
describe("Jasmine", function() {
|
||||
it("makes testing JavaScript awesome!", function() {
|
||||
expect(yourCode).toBeLotsBetter();
|
||||
});
|
||||
});</pre>
|
||||
|
||||
<h2>Documentation</h2>
|
||||
<ul>
|
||||
<li><a href="user-guide.html"><b>User Guide</b></a></li>
|
||||
<li><a href="release-notes.html">Release Notes</a></li>
|
||||
<li><a href="jsdoc/index.html">API Documentation</a></li>
|
||||
<li><a href="http://github.com/pivotal/jasmine#README">Contributor Guide</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Download</h2>
|
||||
<h4>For pure JavaScript projects:</h4>
|
||||
<!-- START_DOWNLOADS -->
|
||||
<table id="standalone-downloads">
|
||||
<tr><th></th><th>Version</th><th>Size</th><th>Date</th><th>SHA1</th></tr>
|
||||
<tr>
|
||||
<td class="link"><a href='downloads/jasmine-standalone-1.0.0.zip'>jasmine-standalone-1.0.0.zip</a></td>
|
||||
<td class="version">1.0.0</td>
|
||||
<td class="size">20k</td>
|
||||
<td class="date">2010/09/14 12:54:38 PDT</td>
|
||||
<td class="sha">1866f654a3ad0ab9109393ce31d6613c77916607</td>
|
||||
</tr>
|
||||
<tr class="rc">
|
||||
<td class="link"><a href='downloads/jasmine-standalone-1.0.0.rc1.zip'>jasmine-standalone-1.0.0.rc1.zip</a></td>
|
||||
<td class="version">1.0.0.rc1</td>
|
||||
<td class="size">19k</td>
|
||||
<td class="date">2010/08/26 13:09:41 PDT</td>
|
||||
<td class="sha">20e7da22bc7ce3433331a5ad44eb199f4ff34065</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="link"><a href='downloads/jasmine-standalone-0.11.1.zip'>jasmine-standalone-0.11.1.zip</a></td>
|
||||
<td class="version">0.11.1</td>
|
||||
<td class="size">18k</td>
|
||||
<td class="date">2010/06/25 16:05:30 PDT</td>
|
||||
<td class="sha">26998c7ca047e47f84c382a4efeb1dc5cb8661a6</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- END_DOWNLOADS -->
|
||||
|
||||
<h4>For Rails integration:</h4>
|
||||
<pre>
|
||||
> gem install jasmine
|
||||
> script/generate jasmine
|
||||
> rake spec
|
||||
</pre>
|
||||
|
||||
For more details on integration with various flavors of Ruby and Rails see <a href="http://github.com/pivotal/jasmine-gem">Jasmine Gem</a>.
|
||||
|
||||
<h4><i>More environment integrations on the way!</i></h4>
|
||||
|
||||
<h2>Support</h2>
|
||||
|
||||
<p style="float: right">
|
||||
<span class="small">Powered by <a href="http://pivotallabs.com/"><img src="images/pivotal_logo.gif" alt="Pivotal Labs" style="vertical-align: middle;"></a></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Discussion:</b> <a href="http://groups.google.com/group/jasmine-js">http://groups.google.com/group/jasmine-js</a>
|
||||
<br/><b>Group email:</b> <a href="mailto:jasmine-js@googlegroups.com">jasmine-js@googlegroups.com</a>
|
||||
<br/><b>Current build status</b> of Jasmine is visible at <a href="http://ci.pivotallabs.com/">ci.pivotallabs.com</a>
|
||||
<br/><b>Pivotal Tracker project:</b> <a href="http://www.pivotaltracker.com/projects/10606">http://www.pivotaltracker.com/projects/10606</a>
|
||||
<br/><b>Twitter:</b> <a href="http://twitter.com/JasmineBDD">@JasmineBDD</a>
|
||||
</p>
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
layout: default
|
||||
title: "Jasmine: BDD for Javascript"
|
||||
---
|
||||
|
||||
# BDD for your JavaScript
|
||||
|
||||
Jasmine is a behavior-driven development framework for testing your JavaScript code. It does not depend on any other
|
||||
JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
|
||||
|
||||
{% highlight javascript %}
|
||||
describe("Jasmine", function() {
|
||||
it("makes testing JavaScript awesome!", function() {
|
||||
expect(yourCode).toBeLotsBetter();
|
||||
});
|
||||
});
|
||||
{% endhighlight %}
|
||||
|
||||
## Adding Jasmine to your Rails project
|
||||
|
||||
{% highlight sh %}
|
||||
$ gem install jasmine
|
||||
$ 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).
|
||||
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)
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: default
|
||||
title: Jasmine Matchers
|
||||
---
|
|
@ -2,100 +2,99 @@
|
|||
layout: default
|
||||
title: Jasmine Release Notes
|
||||
---
|
||||
<h1>Release Notes</h1>
|
||||
|
||||
<div class="wikistyle">
|
||||
# Release Notes
|
||||
|
||||
<div class="release">
|
||||
<h2>Release 1.0 — September 14, 2010</h2>
|
||||
<h3>Jasmine Core</h3>
|
||||
-----
|
||||
## Release 1.0 — September 14, 2010
|
||||
-----
|
||||
|
||||
<h4>Features</h4>
|
||||
<ul>
|
||||
<li><code>waitsFor()</code> arguments can now be specified in any order. Timeout and message are optional.</li>
|
||||
<li>The default <code>waitsFor()</code> timeout period is now specified in <code>env.defaultTimeoutInterval</code>; the default value is 5 seconds.</li>
|
||||
<li>Added link to jasmine site from html runner.</li>
|
||||
<li>Added license file to standalone distribution.</li>
|
||||
<li>New friendly version number.</li>
|
||||
</ul>
|
||||
### Jasmine Core
|
||||
|
||||
<h4>Bugs fixed:</h4>
|
||||
<ul>
|
||||
<li><code>waitsFor()</code> hanged forever if latch function never returned true.</li>
|
||||
<li>The <code>not.toThrow()</code> matcher threw an exception when used with no args.</li>
|
||||
<li>The <code>toThrow()</code> matcher, when inverted, gave misleading failure messages.</li>
|
||||
<li>Spy matchers, when inverted, gave misleading failure messages.</li>
|
||||
</ul>
|
||||
#### Features
|
||||
<ul>
|
||||
<li><code>waitsFor()</code> arguments can now be specified in any order. Timeout and message are optional.</li>
|
||||
<li>The default <code>waitsFor()</code> timeout period is now specified in <code>env.defaultTimeoutInterval</code>; the default value is 5 seconds.</li>
|
||||
<li>Added link to jasmine site from html runner.</li>
|
||||
<li>Added license file to standalone distribution.</li>
|
||||
<li>New friendly version number.</li>
|
||||
</ul>
|
||||
|
||||
<h4>Deprecations</h4>
|
||||
<ul>
|
||||
<li>Deprecated <code>waits()</code> block in favor of <code>waitsFor()</code>; <code>waits()</code> will be removed in a future release.</li>
|
||||
<li>Deprecated <code>toNotBe()</code>, <code>toNotEqual()</code>, <code>toNotMatch()</code>, and <code>toNotContain()</code> matchers; they will be removed in a future release.</li>
|
||||
<li>Console X was removed from the distribution as it was no longer used.</li>
|
||||
<li>To give us some flexibility for future features, wrapped matcher functions now return <code>undefined</code> (they previously returned <code>true</code> or <code>false</code>, but this was undocumented).</li>
|
||||
</ul>
|
||||
#### Bugs fixed
|
||||
<ul>
|
||||
<li><code>waitsFor()</code> hanged forever if latch function never returned true.</li>
|
||||
<li>The <code>not.toThrow()</code> matcher threw an exception when used with no args.</li>
|
||||
<li>The <code>toThrow()</code> matcher, when inverted, gave misleading failure messages.</li>
|
||||
<li>Spy matchers, when inverted, gave misleading failure messages.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Jasmine Gem</h3>
|
||||
<h4>Features</h4>
|
||||
<ul>
|
||||
<li>Jasmine now supports JRuby.</li>
|
||||
<li>Jasmine now supports Ruby 1.9.</li>
|
||||
</ul>
|
||||
#### Deprecations
|
||||
<ul>
|
||||
<li>Deprecated <code>waits()</code> block in favor of <code>waitsFor()</code>; <code>waits()</code> will be removed in a future release.</li>
|
||||
<li>Deprecated <code>toNotBe()</code>, <code>toNotEqual()</code>, <code>toNotMatch()</code>, and <code>toNotContain()</code> matchers; they will be removed in a future release.</li>
|
||||
<li>Console X was removed from the distribution as it was no longer used.</li>
|
||||
<li>To give us some flexibility for future features, wrapped matcher functions now return <code>undefined</code> (they previously returned <code>true</code> or <code>false</code>, but this was undocumented).</li>
|
||||
</ul>
|
||||
|
||||
<h4>Bugs fixed:</h4>
|
||||
<ul>
|
||||
<li>Various generator issues fixed.</li>
|
||||
</ul>
|
||||
### Jasmine Gem
|
||||
|
||||
<h4>Known issues:</h4>
|
||||
<ul>
|
||||
<li>Rails 3 and RSpec 2 are not yet fully supported.</li>
|
||||
</ul>
|
||||
</div>
|
||||
#### Features
|
||||
<ul>
|
||||
<li>Jasmine now supports JRuby.</li>
|
||||
<li>Jasmine now supports Ruby 1.9.</li>
|
||||
</ul>
|
||||
|
||||
#### Bugs fixed
|
||||
<ul>
|
||||
<li>Various generator issues fixed.</li>
|
||||
</ul>
|
||||
|
||||
<div class="release">
|
||||
<h2>Release 0.11.1 — June 25, 2010</h2>
|
||||
<h3>Jasmine Core</h3>
|
||||
#### Known issues
|
||||
<ul>
|
||||
<li>Rails 3 and RSpec 2 are not yet fully supported.</li>
|
||||
</ul>
|
||||
|
||||
<h4>Features</h4>
|
||||
<ul>
|
||||
<li>Jasmine no longer logs "Jasmine Running…" messages to the log by default. This can be enabled in runner.html by adding 'trivialReporter.logRunningSpecs = true;'.</li>
|
||||
<li>The <code>wasCalled()</code>, <code>wasCalledWith()</code>, <code>wasNotCalled()</code> and <code>wasNotCalledWith()</code> matchers have been deprecated. The new matchers <code>toHaveBeenCalled()</code> and <code>toHaveBeenCalledWith()</code> have been added. You can use the <code>not</code> prefix to achieve equivalent of the <code>wasNot…()</code> expectation (e.g. <code>not.toHaveBeenCalled()</code>).</li>
|
||||
</ul>
|
||||
-----
|
||||
## Release 0.11.1 — June 25, 2010
|
||||
-----
|
||||
|
||||
<h4>Notables</h4>
|
||||
<ul>
|
||||
<li>A barebones version of Jasmine is now available on <a href="http://pivotal.github.com/jasmine/">http://pivotal.github.com/jasmine/</a>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
### Jasmine Core
|
||||
|
||||
##### Features
|
||||
<ul>
|
||||
<li>Jasmine no longer logs "Jasmine Running…" messages to the log by default. This can be enabled in runner.html by adding 'trivialReporter.logRunningSpecs = true;'.</li>
|
||||
<li>The <code>wasCalled()</code>, <code>wasCalledWith()</code>, <code>wasNotCalled()</code> and <code>wasNotCalledWith()</code> matchers have been deprecated. The new matchers <code>toHaveBeenCalled()</code> and <code>toHaveBeenCalledWith()</code> have been added. You can use the <code>not</code> prefix to achieve equivalent of the <code>wasNot…()</code> expectation (e.g. <code>not.toHaveBeenCalled()</code>).</li>
|
||||
</ul>
|
||||
|
||||
<div class="release">
|
||||
<h2>Release 0.11.0 — June 23, 2010</h2>
|
||||
<h3>Jasmine Core</h3>
|
||||
#### Notables
|
||||
<ul>
|
||||
<li>A barebones version of Jasmine is now available on <a href="http://pivotal.github.com/jasmine/">http://pivotal.github.com/jasmine/</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h4>Features</h4>
|
||||
<ul>
|
||||
<li>The version number has been removed from the generated single-file /lib/jasmine.js. We're also now uploading this file, with the version number in the filename, to github's Downloads page.</li>
|
||||
<li>Old-style matchers (those using this.report(), from before 0.10.x) are no longer supported. See the <span class="caps">README</span> for instructions on writing new-style matchers.</li>
|
||||
<li><strong>jasmine.log</strong> pretty-prints its parameters to the spec's output.</li>
|
||||
<li>Jasmine no longer depends on 'window'.</li>
|
||||
<li><span class="caps">HTML</span> runner should show number of passes/fails by spec, not expectation.</li>
|
||||
<li>Small modification to JsApiReporter data format.</li>
|
||||
</ul>
|
||||
-----
|
||||
## Release 0.11.0 — June 23, 2010
|
||||
-----
|
||||
### Jasmine Core
|
||||
|
||||
<h4>Bugs fixed:</h4>
|
||||
<ul>
|
||||
<li>If multiple beforeEach blocks were declared, they were executed in reverse order.</li>
|
||||
<li>Specs with duplicate names confused TrivialReporter output.</li>
|
||||
<li>Errors in describe functions caused later tests to be weirdly nested.</li>
|
||||
<li>Nested specs weren't reported properly by the JsApiReporter.</li>
|
||||
</ul>
|
||||
#### Features
|
||||
<ul>
|
||||
<li>The version number has been removed from the generated single-file /lib/jasmine.js. We're also now uploading this file, with the version number in the filename, to github's Downloads page.</li>
|
||||
<li>Old-style matchers (those using this.report(), from before 0.10.x) are no longer supported. See the <span class="caps">README</span> for instructions on writing new-style matchers.</li>
|
||||
<li><strong>jasmine.log</strong> pretty-prints its parameters to the spec's output.</li>
|
||||
<li>Jasmine no longer depends on 'window'.</li>
|
||||
<li><span class="caps">HTML</span> runner should show number of passes/fails by spec, not expectation.</li>
|
||||
<li>Small modification to JsApiReporter data format.</li>
|
||||
</ul>
|
||||
|
||||
<h4>Known issues:</h4>
|
||||
<ul>
|
||||
<li>If you turn on the mock clock, you'll get a spurious log message at the end of your spec.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
#### Bugs fixed:
|
||||
<ul>
|
||||
<li>If multiple beforeEach blocks were declared, they were executed in reverse order.</li>
|
||||
<li>Specs with duplicate names confused TrivialReporter output.</li>
|
||||
<li>Errors in describe functions caused later tests to be weirdly nested.</li>
|
||||
<li>Nested specs weren't reported properly by the JsApiReporter.</li>
|
||||
</ul>
|
||||
|
||||
#### Known issues:
|
||||
<ul>
|
||||
<li>If you turn on the mock clock, you'll get a spurious log message at the end of your spec.</li>
|
||||
</ul>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: default
|
||||
title: Jasmine Spies
|
||||
---
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: default
|
||||
title: Jasmine Suites & Specs
|
||||
---
|
|
@ -2,24 +2,21 @@
|
|||
layout: default
|
||||
title: Jasmine User Guide
|
||||
---
|
||||
=======
|
||||
|
||||
Quick Start
|
||||
----------
|
||||
# Quick Start
|
||||
|
||||
#### For JavaScript-only projects:
|
||||
## For JavaScript-only projects:
|
||||
1. Get the latest standalone release from the [downloads page](index.html).
|
||||
2. Open `SpecRunner.html` in your favorite browser.
|
||||
|
||||
#### Other distributions:
|
||||
## Other distributions:
|
||||
* For integration with the Ruby environment, including automated execution with Selenium, please use the [jasmine gem](http://github.com/pivotal/jasmine-gem).
|
||||
|
||||
### Which Release Should I Use?
|
||||
# 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.
|
||||
|
||||
Why Another JavaScript TDD/BDD Framework?
|
||||
-----------
|
||||
# Why Another JavaScript TDD/BDD Framework?
|
||||
|
||||
There are some great JavaScript testing frameworks out there already, so why did we write another?
|
||||
|
||||
|
@ -27,33 +24,31 @@ None of the existing frameworks quite worked the way we wanted. Many only work f
|
|||
|
||||
So we decided to start from scratch.
|
||||
|
||||
Enter Jasmine
|
||||
------------
|
||||
# Enter Jasmine
|
||||
|
||||
Jasmine is our dream JavaScript testing framework. It's heavily influenced by, and borrows the best parts of, ScrewUnit, JSSpec, [JSpec](http://github.com/visionmedia/jspec/tree/master), and of course RSpec.
|
||||
|
||||
Jasmine was designed with a few principles in mind. We believe that a good JavaScript testing framework:
|
||||
|
||||
* should not be tied to any browser, framework, platform, or host language.
|
||||
* should have idiomatic and unsurprising syntax.
|
||||
* should work anywhere JavaScript can run, including browsers, servers, phones, etc.
|
||||
* shouldn't intrude in your application's territory (e.g. by cluttering the global namespace).
|
||||
* should play well with IDEs (e.g. test code should pass static analysis).
|
||||
* should not be tied to any browser, framework, platform, or host language.
|
||||
* should have idiomatic and unsurprising syntax.
|
||||
* should work anywhere JavaScript can run, including browsers, servers, phones, etc.
|
||||
* shouldn't intrude in your application's territory (e.g. by cluttering the global namespace).
|
||||
* should play well with IDEs (e.g. test code should pass static analysis).
|
||||
|
||||
Some of our goals while writing Jasmine:
|
||||
|
||||
* it should encourage good testing practices.
|
||||
* it should integrate easily with continuous build systems.
|
||||
* it should be simple to get started with.
|
||||
* it should encourage good testing practices.
|
||||
* it should integrate easily with continuous build systems.
|
||||
* it should be simple to get started with.
|
||||
|
||||
The result is Jasmine, and we love test-driving our code with it. Enjoy.
|
||||
|
||||
How To
|
||||
------
|
||||
# How To
|
||||
|
||||
There is a simple example of how to use Jasmine in the /example directory, but here's more information.
|
||||
|
||||
### Specs
|
||||
## Specs
|
||||
|
||||
Each spec is, naturally, a JavaScript function. You tell Jasmine about a spec with a call to `it()` with a description string and the function. The string is a description of a behavior that you want your production code to exhibit; it should be meaningful to you when reading a report.
|
||||
|
||||
|
@ -62,7 +57,7 @@ Each spec is, naturally, a JavaScript function. You tell Jasmine about a spec w
|
|||
foo++;
|
||||
});
|
||||
|
||||
### Expectations
|
||||
## Expectations
|
||||
|
||||
Within your spec you will express expectations about the behavior of your application code. This is done using the `expect()` function and any of various expectation matchers, like this:
|
||||
|
||||
|
@ -75,7 +70,7 @@ Within your spec you will express expectations about the behavior of your applic
|
|||
|
||||
Results of the expectations will be reported to you when the spec is run.
|
||||
|
||||
#### Expectation Matchers
|
||||
### Expectation Matchers
|
||||
|
||||
Jasmine has several built-in matchers. Here are a few:
|
||||
|
||||
|
|
Loading…
Reference in New Issue