Skip to content

Commit

Permalink
initializing spec suite
Browse files Browse the repository at this point in the history
  • Loading branch information
max-mapper committed Feb 19, 2010
1 parent 2b7314c commit 57d9bd8
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*.DS_Store
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions jquery.jplayer/spec/commands/example_command.rb
@@ -0,0 +1,19 @@

# uncomment and call with `$ jspec example `

# command :example do |c|
# c.syntax = 'jspec example [options]'
# c.description = 'Just an example command'
# c.option '-f', '--foo string', 'Does some foo with <string>'
# c.option '-b', '--bar [string]', 'Does some bar with [string]'
# c.example 'Do some foo', 'jspec example --foo bar'
# c.example 'Do some bar', 'jspec example --bar'
# c.when_called do |args, options|
# p args
# p options.__hash__
# # options.foo
# # options.bar
# # options.__hash__[:foo]
# # options.__hash__[:bar]
# end
# end
22 changes: 22 additions & 0 deletions jquery.jplayer/spec/dom.html
@@ -0,0 +1,22 @@
<html>
<head>
<link type="text/css" rel="stylesheet" href="/opt/local/lib/ruby/gems/1.8/gems/jspec-3.3.0/lib/jspec.css" />
<script src="/opt/local/lib/ruby/gems/1.8/gems/jspec-3.3.0/lib/jspec.js"></script>
<script src="/opt/local/lib/ruby/gems/1.8/gems/jspec-3.3.0/lib/jspec.xhr.js"></script>
<script src="../lib/jquery.jplayer.js"></script>
<script src="unit/spec.helper.js"></script>
<script>
function runSuites() {
JSpec
.exec('unit/spec.js')
.run({ fixturePath: 'fixtures' })
.report()
}
</script>
</head>
<body class="jspec" onLoad="runSuites();">
<div id="jspec-top"><h2 id="jspec-title">JSpec <em><script>document.write(JSpec.version)</script></em></h2></div>
<div id="jspec"></div>
<div id="jspec-bottom"></div>
</body>
</html>
10 changes: 10 additions & 0 deletions jquery.jplayer/spec/node.js
@@ -0,0 +1,10 @@

require.paths.unshift('spec', '/opt/local/lib/ruby/gems/1.8/gems/jspec-3.3.0/lib', 'lib')
require('jspec')
require('unit/spec.helper')
require('yourlib')

JSpec
.exec('spec/unit/spec.js')
.run({ reporter: JSpec.reporters.Terminal, fixturePath: 'spec/fixtures' })
.report()
10 changes: 10 additions & 0 deletions jquery.jplayer/spec/rhino.js
@@ -0,0 +1,10 @@

load('/opt/local/lib/ruby/gems/1.8/gems/jspec-3.3.0/lib/jspec.js')
load('/opt/local/lib/ruby/gems/1.8/gems/jspec-3.3.0/lib/jspec.xhr.js')
load('lib/yourlib.js')
load('spec/unit/spec.helper.js')

JSpec
.exec('spec/unit/spec.js')
.run({ reporter: JSpec.reporters.Terminal, fixturePath: 'spec/fixtures' })
.report()
18 changes: 18 additions & 0 deletions jquery.jplayer/spec/server.html
@@ -0,0 +1,18 @@
<html>
<head>
<script src="/jspec/jspec.js"></script>
<script src="/jspec/jspec.xhr.js"></script>
<script src="/lib/yourlib.js"></script>
<script src="/spec/unit/spec.helper.js"></script>
<script>
function runSuites() {
JSpec
.exec('unit/spec.js')
.run({ reporter: JSpec.reporters.Server, verbose: true, failuresOnly: true, fixturePath: '/spec/fixtures' })
.report()
}
</script>
</head>
<body class="jspec" onLoad="runSuites();">
</body>
</html>
4 changes: 4 additions & 0 deletions jquery.jplayer/spec/server.rb
@@ -0,0 +1,4 @@

get '/lib/*' do |path|
send_file File.dirname(__FILE__) + '/../lib/' + path
end
Empty file.
4 changes: 4 additions & 0 deletions jquery.jplayer/spec/unit/spec.js
@@ -0,0 +1,4 @@

describe '$.fn.jPlayer'

end

0 comments on commit 57d9bd8

Please sign in to comment.