jspec 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +3 -1
- data/bin/jspec +1 -1
- data/jspec.gemspec +3 -3
- data/spec/node.js +6 -7
- data/spec/unit/spec.matchers.js +3 -2
- data/templates/default/spec/node.js +24 -0
- metadata +4 -3
data/Rakefile
CHANGED
data/bin/jspec
CHANGED
data/jspec.gemspec
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{jspec}
|
|
5
|
-
s.version = "3.
|
|
5
|
+
s.version = "3.1.0"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["TJ Holowaychuk"]
|
|
9
|
-
s.date = %q{2010-01-
|
|
9
|
+
s.date = %q{2010-01-05}
|
|
10
10
|
s.default_executable = %q{jspec}
|
|
11
11
|
s.description = %q{JavaScript BDD Testing Framework}
|
|
12
12
|
s.email = %q{tj@vision-media.ca}
|
|
13
13
|
s.executables = ["jspec"]
|
|
14
14
|
s.extra_rdoc_files = ["README.md", "bin/jspec", "lib/images/bg.png", "lib/images/hr.png", "lib/images/loading.gif", "lib/images/sprites.bg.png", "lib/images/sprites.png", "lib/images/vr.png", "lib/jspec.css", "lib/jspec.growl.js", "lib/jspec.jquery.js", "lib/jspec.js", "lib/jspec.shell.js", "lib/jspec.timers.js", "lib/jspec.xhr.js"]
|
|
15
|
-
s.files = ["History.md", "Manifest", "README.md", "Rakefile", "bin/jspec", "lib/images/bg.png", "lib/images/hr.png", "lib/images/loading.gif", "lib/images/sprites.bg.png", "lib/images/sprites.png", "lib/images/vr.png", "lib/jspec.css", "lib/jspec.growl.js", "lib/jspec.jquery.js", "lib/jspec.js", "lib/jspec.shell.js", "lib/jspec.timers.js", "lib/jspec.xhr.js", "spec/commands/example_command.rb", "spec/dom.html", "spec/fixtures/test.html", "spec/fixtures/test.json", "spec/fixtures/test.xml", "spec/node.js", "spec/rhino.js", "spec/ruby/bin/init_spec.rb", "spec/ruby/bin/install_spec.rb", "spec/ruby/bin/run_spec.rb", "spec/ruby/bin/shell_spec.rb", "spec/ruby/bin/spec_helper.rb", "spec/ruby/bin/update_spec.rb", "spec/server.html", "spec/server.rb", "spec/support/env.js", "spec/support/jquery.js", "spec/unit/helpers.js", "spec/unit/spec.fixtures.js", "spec/unit/spec.grammar-less.js", "spec/unit/spec.grammar.js", "spec/unit/spec.jquery.js", "spec/unit/spec.jquery.xhr.js", "spec/unit/spec.js", "spec/unit/spec.matchers.js", "spec/unit/spec.modules.js", "spec/unit/spec.shared-behaviors.js", "spec/unit/spec.utils.js", "spec/unit/spec.xhr.js", "src/browsers.rb", "src/helpers.rb", "src/installables.rb", "src/project.rb", "src/routes.rb", "src/server.rb", "support/js.jar", "templates/default/History.md", "templates/default/Readme.md", "templates/default/lib/yourlib.js", "templates/default/spec/commands/example_command.rb", "templates/default/spec/dom.html", "templates/default/spec/rhino.js", "templates/default/spec/server.html", "templates/default/spec/server.rb", "templates/default/spec/unit/spec.helper.js", "templates/default/spec/unit/spec.js", "templates/rails/commands/example_commands.rb", "templates/rails/dom.html", "templates/rails/rhino.js", "templates/rails/server.html", "templates/rails/server.rb", "templates/rails/unit/spec.helper.js", "templates/rails/unit/spec.js"
|
|
15
|
+
s.files = ["History.md", "Manifest", "README.md", "Rakefile", "bin/jspec", "jspec.gemspec", "lib/images/bg.png", "lib/images/hr.png", "lib/images/loading.gif", "lib/images/sprites.bg.png", "lib/images/sprites.png", "lib/images/vr.png", "lib/jspec.css", "lib/jspec.growl.js", "lib/jspec.jquery.js", "lib/jspec.js", "lib/jspec.shell.js", "lib/jspec.timers.js", "lib/jspec.xhr.js", "spec/commands/example_command.rb", "spec/dom.html", "spec/fixtures/test.html", "spec/fixtures/test.json", "spec/fixtures/test.xml", "spec/node.js", "spec/rhino.js", "spec/ruby/bin/init_spec.rb", "spec/ruby/bin/install_spec.rb", "spec/ruby/bin/run_spec.rb", "spec/ruby/bin/shell_spec.rb", "spec/ruby/bin/spec_helper.rb", "spec/ruby/bin/update_spec.rb", "spec/server.html", "spec/server.rb", "spec/support/env.js", "spec/support/jquery.js", "spec/unit/helpers.js", "spec/unit/spec.fixtures.js", "spec/unit/spec.grammar-less.js", "spec/unit/spec.grammar.js", "spec/unit/spec.jquery.js", "spec/unit/spec.jquery.xhr.js", "spec/unit/spec.js", "spec/unit/spec.matchers.js", "spec/unit/spec.modules.js", "spec/unit/spec.shared-behaviors.js", "spec/unit/spec.utils.js", "spec/unit/spec.xhr.js", "src/browsers.rb", "src/helpers.rb", "src/installables.rb", "src/project.rb", "src/routes.rb", "src/server.rb", "support/js.jar", "templates/default/History.md", "templates/default/Readme.md", "templates/default/lib/yourlib.js", "templates/default/spec/commands/example_command.rb", "templates/default/spec/dom.html", "templates/default/spec/node.js", "templates/default/spec/rhino.js", "templates/default/spec/server.html", "templates/default/spec/server.rb", "templates/default/spec/unit/spec.helper.js", "templates/default/spec/unit/spec.js", "templates/rails/commands/example_commands.rb", "templates/rails/dom.html", "templates/rails/rhino.js", "templates/rails/server.html", "templates/rails/server.rb", "templates/rails/unit/spec.helper.js", "templates/rails/unit/spec.js"]
|
|
16
16
|
s.homepage = %q{http://visionmedia.github.com/jspec}
|
|
17
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Jspec", "--main", "README.md"]
|
|
18
18
|
s.require_paths = ["lib"]
|
data/spec/node.js
CHANGED
|
@@ -9,13 +9,12 @@ quit = process.exit
|
|
|
9
9
|
print = puts
|
|
10
10
|
|
|
11
11
|
readFile = function(path) {
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
promise.wait()
|
|
12
|
+
var result
|
|
13
|
+
require('posix')
|
|
14
|
+
.cat(path, "utf8")
|
|
15
|
+
.addCallback(function(contents){ result = contents })
|
|
16
|
+
.addErrback(function(){ throw new Error("failed to read file `" + path + "'") })
|
|
17
|
+
.wait()
|
|
19
18
|
return result
|
|
20
19
|
}
|
|
21
20
|
|
data/spec/unit/spec.matchers.js
CHANGED
|
@@ -225,18 +225,19 @@ describe 'Matchers'
|
|
|
225
225
|
end
|
|
226
226
|
|
|
227
227
|
it 'should check if an error of a specific constructor is thrown'
|
|
228
|
-
function CustomError(
|
|
228
|
+
function CustomError() {}
|
|
229
229
|
CustomError.name = "CustomError"
|
|
230
230
|
-{ throw new Error('foo') }.should.throw_error(Error)
|
|
231
231
|
-{ throw new CustomError('foo') }.should.throw_error(CustomError)
|
|
232
232
|
-{ throw 'foo' }.should.not.throw_error CustomError
|
|
233
|
+
-{ throw new CustomError('foo') }.should.not.throw_error Error
|
|
233
234
|
end
|
|
234
235
|
|
|
235
236
|
it 'should check if an error with a specific constructor and message is thrown'
|
|
236
237
|
Error.name = "Error"
|
|
237
238
|
function CustomError(message) { this.message = message }
|
|
238
239
|
CustomError.name = "CustomError"
|
|
239
|
-
CustomError.prototype.toString = function(){ return 'CustomError:
|
|
240
|
+
CustomError.prototype.toString = function(){ return 'CustomError: ' + this.message }
|
|
240
241
|
-{ throw new CustomError('oh no!') }.should.throw_error(CustomError, 'oh no!')
|
|
241
242
|
-{ throw new CustomError('oh no!') }.should.not.throw_error(CustomError, 'foo bar')
|
|
242
243
|
-{ throw new CustomError('oh no!') }.should.throw_error(CustomError, /oh no/)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
process.mixin(require('sys'))
|
|
3
|
+
require.paths.unshift('spec', 'JSPEC_ROOT/lib', 'lib')
|
|
4
|
+
require('jspec')
|
|
5
|
+
require('unit/spec.helper')
|
|
6
|
+
require('yourlib')
|
|
7
|
+
|
|
8
|
+
quit = process.exit
|
|
9
|
+
print = puts
|
|
10
|
+
|
|
11
|
+
readFile = function(path) {
|
|
12
|
+
var result
|
|
13
|
+
require('posix')
|
|
14
|
+
.cat(path, "utf8")
|
|
15
|
+
.addCallback(function(contents){ result = contents })
|
|
16
|
+
.addErrback(function(){ throw new Error("failed to read file `" + path + "'") })
|
|
17
|
+
.wait()
|
|
18
|
+
return result
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
JSpec
|
|
22
|
+
.exec('spec/unit/spec.js')
|
|
23
|
+
.run({ reporter: JSpec.reporters.Terminal })
|
|
24
|
+
.report()
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- TJ Holowaychuk
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2010-01-
|
|
12
|
+
date: 2010-01-05 00:00:00 -08:00
|
|
13
13
|
default_executable: jspec
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -80,6 +80,7 @@ files:
|
|
|
80
80
|
- README.md
|
|
81
81
|
- Rakefile
|
|
82
82
|
- bin/jspec
|
|
83
|
+
- jspec.gemspec
|
|
83
84
|
- lib/images/bg.png
|
|
84
85
|
- lib/images/hr.png
|
|
85
86
|
- lib/images/loading.gif
|
|
@@ -134,6 +135,7 @@ files:
|
|
|
134
135
|
- templates/default/lib/yourlib.js
|
|
135
136
|
- templates/default/spec/commands/example_command.rb
|
|
136
137
|
- templates/default/spec/dom.html
|
|
138
|
+
- templates/default/spec/node.js
|
|
137
139
|
- templates/default/spec/rhino.js
|
|
138
140
|
- templates/default/spec/server.html
|
|
139
141
|
- templates/default/spec/server.rb
|
|
@@ -146,7 +148,6 @@ files:
|
|
|
146
148
|
- templates/rails/server.rb
|
|
147
149
|
- templates/rails/unit/spec.helper.js
|
|
148
150
|
- templates/rails/unit/spec.js
|
|
149
|
-
- jspec.gemspec
|
|
150
151
|
has_rdoc: true
|
|
151
152
|
homepage: http://visionmedia.github.com/jspec
|
|
152
153
|
licenses: []
|