forked from airportyh/jspec
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,315 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
JSpec = { | ||
|
||
version : '1.0.3', | ||
version : '1.0.4', | ||
main : this, | ||
suites : [], | ||
matchers : {}, | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
body.jspec { | ||
margin: 45px 0; | ||
text-align: center; | ||
font: 12px "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; | ||
background: #efefef url(images/bg.png) top left repeat-x; | ||
} | ||
#jspec { | ||
margin: 0 auto; | ||
padding-top: 25px; | ||
width: 1008px; | ||
background: url(images/vr.png) top left repeat-y; | ||
text-align: left; | ||
} | ||
#jspec-top { | ||
position: relative; | ||
margin: 0 auto; | ||
width: 1008px; | ||
height: 40px; | ||
background: url(images/sprites.bg.png) top left no-repeat; | ||
} | ||
#jspec-bottom { | ||
margin: 0 auto; | ||
width: 1008px; | ||
height: 15px; | ||
background: url(images/sprites.bg.png) bottom left no-repeat; | ||
} | ||
#jspec-title { | ||
position: relative; | ||
top: 35px; | ||
left: 20px; | ||
width: 160px; | ||
font-size: 22px; | ||
font-weight: normal; | ||
background: url(images/sprites.png) 0 -126px no-repeat; | ||
} | ||
#jspec-title em { | ||
font-size: 10px; | ||
font-style: normal; | ||
color: #BCC8D1; | ||
} | ||
#jspec-report * { | ||
margin: 0; | ||
padding: 0; | ||
background: none; | ||
border: none; | ||
} | ||
#jspec-report { | ||
padding: 15px 40px; | ||
font: 11px "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; | ||
color: #7B8D9B; | ||
} | ||
#jspec-report.has-failures { | ||
padding-bottom: 30px; | ||
} | ||
#jspec-report .hidden { | ||
display: none; | ||
} | ||
#jspec-report .heading { | ||
margin-bottom: 15px; | ||
} | ||
#jspec-report .heading span { | ||
padding-right: 10px; | ||
} | ||
#jspec-report .heading .passes em { | ||
color: #0ea0eb; | ||
} | ||
#jspec-report .heading .failures em { | ||
color: #FA1616; | ||
} | ||
#jspec-report table { | ||
width: 100%; | ||
font-size: 11px; | ||
border-collapse: collapse; | ||
} | ||
#jspec-report td { | ||
padding: 8px; | ||
text-indent: 30px; | ||
color: #7B8D9B; | ||
} | ||
#jspec-report tr td:first-child em { | ||
font-style: normal; | ||
font-weight: normal; | ||
color: #7B8D9B; | ||
} | ||
#jspec-report tr:not(.description):hover { | ||
text-shadow: 1px 1px 1px #fff; | ||
background: #F2F5F7; | ||
} | ||
#jspec-report td + td { | ||
padding-right: 0; | ||
width: 15px; | ||
} | ||
#jspec-report td.pass { | ||
background: url(images/sprites.png) 3px -7px no-repeat; | ||
} | ||
#jspec-report td.fail { | ||
background: url(images/sprites.png) 3px -47px no-repeat; | ||
font-weight: bold; | ||
color: #FC0D0D; | ||
} | ||
#jspec-report td.requires-implementation { | ||
background: url(images/sprites.png) 3px -87px no-repeat; | ||
} | ||
#jspec-report tr.description td { | ||
margin-top: 25px; | ||
padding-top: 25px; | ||
font-size: 12px; | ||
font-weight: bold; | ||
text-indent: 0; | ||
color: #1a1a1a; | ||
} | ||
#jspec-report tr.description:first-child td { | ||
border-top: none; | ||
} | ||
#jspec-report .assertion { | ||
display: block; | ||
float: left; | ||
margin: 0 0 0 1px; | ||
padding: 0; | ||
width: 1px; | ||
height: 5px; | ||
background: #7B8D9B; | ||
} | ||
#jspec-report .assertion.failed { | ||
background: red; | ||
} | ||
.jspec-sandbox { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
// JSpec - jQuery - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed) | ||
|
||
(function($, $$){ | ||
|
||
// --- Dependencies | ||
|
||
$$.requires('jQuery', 'when using jspec.jquery.js') | ||
|
||
// --- Async Support | ||
|
||
$.ajaxSetup({ async : false }) | ||
|
||
// --- Helpers | ||
|
||
$$.defaultContext.element = $ | ||
$$.defaultContext.elements = $ | ||
$$.defaultContext.defaultSandbox = $$.defaultContext.sandbox | ||
$$.defaultContext.sandbox = function() { return $($$.defaultContext.defaultSandbox()) } | ||
|
||
// --- Matchers | ||
|
||
$$.addMatchers({ | ||
have_tag : "jQuery(expected, actual).length == 1", | ||
have_one : "alias have_tag", | ||
have_tags : "jQuery(expected, actual).length > 1", | ||
have_many : "alias have_tags", | ||
have_child : "jQuery(actual).children(expected).length == 1", | ||
have_children : "jQuery(actual).children(expected).length > 1", | ||
have_class : "jQuery(actual).hasClass(expected)", | ||
have_text : "jQuery(actual).text() == expected", | ||
have_value : "jQuery(actual).val() == expected", | ||
be_visible : "!jQuery(actual).is(':hidden')", | ||
be_hidden : "jQuery(actual).is(':hidden')", | ||
be_enabled : "!jQuery(actual).attr('disabled')", | ||
|
||
have_attr : { match : function(actual, attr, value) { | ||
if (value) return $(actual).attr(attr) == value | ||
else return $(actual).attr(attr) | ||
} | ||
} | ||
}) | ||
|
||
// --- be_BOOLATTR | ||
|
||
$$.each('disabled selected checked', function(attr){ | ||
$$.matchers['be_' + attr] = "jQuery(actual).attr('" + attr + "')" | ||
}) | ||
|
||
// --- have_ATTR | ||
|
||
$$.each('type id title alt href src rel rev name target', function(attr){ | ||
$$.matchers['have_' + attr] = { match : function(actual, value) { | ||
return $$.matchers.have_attr.match(actual, attr, value) | ||
} | ||
} | ||
}) | ||
|
||
// --- be_a_TYPE_input (deprecated) | ||
|
||
$$.each('checkbox radio file password submit image text reset button', function(type){ | ||
console.warn("be_a_" + type + "_input is deprected; use have_type('" + type + "')"); | ||
JSpec.matchers['be_a_' + type + '_input'] = "jQuery(actual).get(0).type == '" + type + "'" | ||
}) | ||
|
||
})(jQuery, JSpec) | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.