jspec 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +5 -0
- data/README.md +1 -0
- data/bin/jspec +1 -1
- data/jspec.gemspec +3 -3
- data/lib/jspec.js +9 -12
- data/spec/unit/spec.jquery.js +17 -0
- data/spec/unit/spec.jquery.xhr.js +0 -1
- data/spec/unit/spec.utils.js +0 -17
- metadata +41 -21
data/History.md
CHANGED
data/README.md
CHANGED
@@ -917,6 +917,7 @@ your _spec/server.rb_ file may support additional browsers.
|
|
917
917
|
|
918
918
|
- [Google Group](http://groups.google.com/group/jspec)
|
919
919
|
- IRC Channel [irc://irc.freenode.net#jspec](irc://irc.freenode.net#jspec)
|
920
|
+
- Featured in Devmag ["Advanced JavaScript"](http://www.dev-mag.com/2010/02/18/advanced-javascript/) ebook for 4$
|
920
921
|
- Featured article in JSMag [http://www.jsmag.com/main.issues.description/id=21/](http://www.jsmag.com/main.issues.description/id=21/)
|
921
922
|
- Syntax comparison with other frameworks [http://gist.github.com/92283](http://gist.github.com/92283)
|
922
923
|
- Get the TextMate bundle at [https://github.com/visionmedia/jspec.tmbundle/tree](https://github.com/visionmedia/jspec.tmbundle/tree)
|
data/bin/jspec
CHANGED
data/jspec.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{jspec}
|
5
|
-
s.version = "3.3.
|
5
|
+
s.version = "3.3.2"
|
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-02-
|
9
|
+
s.date = %q{2010-02-25}
|
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}
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Jspec", "--main", "README.md"]
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
s.rubyforge_project = %q{jspec}
|
20
|
-
s.rubygems_version = %q{1.3.
|
20
|
+
s.rubygems_version = %q{1.3.6}
|
21
21
|
s.summary = %q{JavaScript BDD Testing Framework}
|
22
22
|
|
23
23
|
if s.respond_to? :specification_version then
|
data/lib/jspec.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
;(function(){
|
5
5
|
|
6
6
|
JSpec = {
|
7
|
-
version : '3.3.
|
7
|
+
version : '3.3.2',
|
8
8
|
assert : true,
|
9
9
|
cache : {},
|
10
10
|
suites : [],
|
@@ -762,8 +762,10 @@
|
|
762
762
|
|
763
763
|
copySpecs : function(fromSuite, toSuite) {
|
764
764
|
each(fromSuite.specs, function(spec){
|
765
|
-
|
766
|
-
|
765
|
+
var newSpec = new Object();
|
766
|
+
extend(newSpec, spec);
|
767
|
+
newSpec.assertions = [];
|
768
|
+
toSuite.specs.push(newSpec);
|
767
769
|
})
|
768
770
|
},
|
769
771
|
|
@@ -1614,15 +1616,10 @@
|
|
1614
1616
|
|
1615
1617
|
// --- Node.js support
|
1616
1618
|
|
1617
|
-
if (typeof GLOBAL === 'object' && typeof exports === 'object')
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
readFile = function(path) {
|
1623
|
-
return fs.readFileSync(path)
|
1624
|
-
}
|
1625
|
-
}
|
1619
|
+
if (typeof GLOBAL === 'object' && typeof exports === 'object')
|
1620
|
+
quit = process.exit,
|
1621
|
+
print = require('sys').puts,
|
1622
|
+
readFile = require('fs').readFileSync
|
1626
1623
|
|
1627
1624
|
// --- Utility functions
|
1628
1625
|
|
data/spec/unit/spec.jquery.js
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
|
2
2
|
describe 'jQuery'
|
3
|
+
describe 'puts()'
|
4
|
+
it 'should output selector when present'
|
5
|
+
object = { jquery: '1.3.2', selector: '.foo bar' }
|
6
|
+
puts(object).should.eql 'selector ".foo bar"'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should output outerHTML otherwise'
|
10
|
+
puts($('<p>Foo</p>')).should.match(/<p>Foo<\/p>/i)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe 'with elements'
|
15
|
+
it 'should output the outerHTML'
|
16
|
+
puts($('<p>Foo</p>').get(0)).should.match(/<p>Foo<\/p>/i)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
3
20
|
describe 'sandbox()'
|
4
21
|
before
|
5
22
|
dom = sandbox()
|
data/spec/unit/spec.utils.js
CHANGED
@@ -335,23 +335,6 @@ describe 'Utility'
|
|
335
335
|
end
|
336
336
|
end
|
337
337
|
|
338
|
-
describe 'with jQuery'
|
339
|
-
it 'should output selector when present'
|
340
|
-
object = { jquery: '1.3.2', selector: '.foo bar' }
|
341
|
-
puts(object).should.eql 'selector ".foo bar"'
|
342
|
-
end
|
343
|
-
|
344
|
-
it 'should output outerHTML otherwise'
|
345
|
-
puts($('<p>Foo</p>')).should.match(/<p>Foo<\/p>/i)
|
346
|
-
end
|
347
|
-
end
|
348
|
-
|
349
|
-
describe 'with elements'
|
350
|
-
it 'should output the outerHTML'
|
351
|
-
puts($('<p>Foo</p>').get(0)).should.match(/<p>Foo<\/p>/i)
|
352
|
-
end
|
353
|
-
end
|
354
|
-
|
355
338
|
describe 'circular references'
|
356
339
|
it 'should output <circular reference> with objects'
|
357
340
|
object = { a: 1 }
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 3
|
7
|
+
- 3
|
8
|
+
- 2
|
9
|
+
version: 3.3.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- TJ Holowaychuk
|
@@ -9,49 +14,61 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-02-
|
17
|
+
date: 2010-02-25 00:00:00 -08:00
|
13
18
|
default_executable: jspec
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: sinatra
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
23
29
|
version: "0"
|
24
|
-
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
25
32
|
- !ruby/object:Gem::Dependency
|
26
33
|
name: json_pure
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
34
|
+
prerelease: false
|
35
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
39
|
+
segments:
|
40
|
+
- 0
|
33
41
|
version: "0"
|
34
|
-
|
42
|
+
type: :runtime
|
43
|
+
version_requirements: *id002
|
35
44
|
- !ruby/object:Gem::Dependency
|
36
45
|
name: commander
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
prerelease: false
|
47
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
48
|
requirements:
|
41
49
|
- - ">="
|
42
50
|
- !ruby/object:Gem::Version
|
51
|
+
segments:
|
52
|
+
- 4
|
53
|
+
- 0
|
54
|
+
- 1
|
43
55
|
version: 4.0.1
|
44
|
-
|
56
|
+
type: :runtime
|
57
|
+
version_requirements: *id003
|
45
58
|
- !ruby/object:Gem::Dependency
|
46
59
|
name: bind
|
47
|
-
|
48
|
-
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
prerelease: false
|
61
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
62
|
requirements:
|
51
63
|
- - ">="
|
52
64
|
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
- 2
|
68
|
+
- 8
|
53
69
|
version: 0.2.8
|
54
|
-
|
70
|
+
type: :runtime
|
71
|
+
version_requirements: *id004
|
55
72
|
description: JavaScript BDD Testing Framework
|
56
73
|
email: tj@vision-media.ca
|
57
74
|
executables:
|
@@ -166,18 +183,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
183
|
requirements:
|
167
184
|
- - ">="
|
168
185
|
- !ruby/object:Gem::Version
|
186
|
+
segments:
|
187
|
+
- 0
|
169
188
|
version: "0"
|
170
|
-
version:
|
171
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
190
|
requirements:
|
173
191
|
- - ">="
|
174
192
|
- !ruby/object:Gem::Version
|
193
|
+
segments:
|
194
|
+
- 1
|
195
|
+
- 2
|
175
196
|
version: "1.2"
|
176
|
-
version:
|
177
197
|
requirements: []
|
178
198
|
|
179
199
|
rubyforge_project: jspec
|
180
|
-
rubygems_version: 1.3.
|
200
|
+
rubygems_version: 1.3.6
|
181
201
|
signing_key:
|
182
202
|
specification_version: 3
|
183
203
|
summary: JavaScript BDD Testing Framework
|