jspec 2.11.13 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +714 -0
- data/Manifest +51 -36
- data/README.md +968 -0
- data/Rakefile +4 -53
- data/bin/jspec +93 -224
- data/jspec.gemspec +5 -5
- data/lib/images/sprites.png +0 -0
- data/lib/jspec.css +2 -2
- data/lib/jspec.growl.js +115 -0
- data/lib/jspec.jquery.js +1 -1
- data/lib/jspec.js +98 -101
- data/lib/jspec.shell.js +5 -2
- data/lib/jspec.timers.js +1 -1
- data/lib/jspec.xhr.js +12 -2
- data/spec/commands/example_command.rb +19 -0
- data/spec/dom.html +33 -0
- data/spec/node.js +32 -0
- data/spec/rhino.js +24 -0
- data/spec/ruby/bin/init_spec.rb +101 -0
- data/spec/ruby/bin/install_spec.rb +141 -0
- data/spec/ruby/bin/run_spec.rb +0 -0
- data/spec/ruby/bin/shell_spec.rb +13 -0
- data/spec/ruby/bin/spec_helper.rb +25 -0
- data/spec/ruby/bin/update_spec.rb +72 -0
- data/spec/server.html +29 -0
- data/spec/server.rb +1 -1
- data/spec/{env.js → support/env.js} +554 -664
- data/spec/support/jquery.js +4376 -0
- data/spec/{helpers.js → unit/helpers.js} +2 -0
- data/spec/{spec.fixtures.js → unit/spec.fixtures.js} +0 -1
- data/spec/{spec.grammar-less.js → unit/spec.grammar-less.js} +0 -0
- data/spec/{spec.grammar.js → unit/spec.grammar.js} +1 -11
- data/spec/{spec.jquery.js → unit/spec.jquery.js} +0 -17
- data/spec/{spec.jquery.xhr.js → unit/spec.jquery.xhr.js} +13 -2
- data/spec/unit/spec.js +187 -0
- data/spec/{spec.matchers.js → unit/spec.matchers.js} +141 -66
- data/spec/{spec.modules.js → unit/spec.modules.js} +0 -0
- data/spec/{spec.shared-behaviors.js → unit/spec.shared-behaviors.js} +0 -0
- data/spec/{spec.utils.js → unit/spec.utils.js} +123 -22
- data/spec/{spec.xhr.js → unit/spec.xhr.js} +11 -10
- data/{server → src}/browsers.rb +23 -0
- data/{server → src}/helpers.rb +2 -17
- data/src/installables.rb +229 -0
- data/src/project.rb +340 -0
- data/{server → src}/routes.rb +1 -1
- data/{server → src}/server.rb +0 -0
- data/support/js.jar +0 -0
- data/templates/default/History.md +5 -0
- data/templates/default/{README.rdoc → Readme.md} +3 -3
- data/templates/default/lib/{yourlib.core.js → yourlib.js} +0 -0
- data/templates/default/spec/commands/example_command.rb +19 -0
- data/templates/default/spec/{spec.dom.html → dom.html} +5 -3
- data/templates/default/spec/rhino.js +10 -0
- data/templates/default/spec/server.html +18 -0
- data/templates/default/spec/unit/spec.helper.js +0 -0
- data/templates/default/spec/{spec.core.js → unit/spec.js} +0 -0
- data/templates/rails/commands/example_commands.rb +19 -0
- data/templates/rails/{spec.dom.html → dom.html} +4 -2
- data/templates/rails/rhino.js +10 -0
- data/templates/rails/server.html +18 -0
- data/templates/rails/unit/spec.helper.js +0 -0
- data/templates/rails/{spec.application.js → unit/spec.js} +0 -0
- metadata +56 -41
- data/History.rdoc +0 -590
- data/README.rdoc +0 -842
- data/spec/async +0 -1
- data/spec/jquery.js +0 -19
- data/spec/spec.dom.html +0 -34
- data/spec/spec.js +0 -166
- data/spec/spec.node.js +0 -46
- data/spec/spec.rhino.js +0 -23
- data/spec/spec.server.html +0 -29
- data/templates/default/History.rdoc +0 -4
- data/templates/default/spec/spec.rhino.js +0 -8
- data/templates/default/spec/spec.server.html +0 -16
- data/templates/rails/spec.rhino.js +0 -8
- data/templates/rails/spec.server.html +0 -16
data/lib/jspec.shell.js
CHANGED
@@ -15,7 +15,8 @@
|
|
15
15
|
|
16
16
|
commands: {
|
17
17
|
quit: ['Terminate the shell', function(){ _quit() }],
|
18
|
-
exit: ['Terminate the shell', function(){ _quit() }]
|
18
|
+
exit: ['Terminate the shell', function(){ _quit() }],
|
19
|
+
p: ['Inspect an object', function(o){ return o.toSource() }]
|
19
20
|
},
|
20
21
|
|
21
22
|
/**
|
@@ -27,7 +28,9 @@
|
|
27
28
|
start : function() {
|
28
29
|
for (var name in this.commands)
|
29
30
|
if (this.commands.hasOwnProperty(name))
|
30
|
-
this.
|
31
|
+
this.commands[name][1].length ?
|
32
|
+
this.main[name] = this.commands[name][1] :
|
33
|
+
this.main.__defineGetter__(name, this.commands[name][1])
|
31
34
|
}
|
32
35
|
}
|
33
36
|
|
data/lib/jspec.timers.js
CHANGED
data/lib/jspec.xhr.js
CHANGED
@@ -8,7 +8,10 @@
|
|
8
8
|
var OriginalXMLHttpRequest = 'XMLHttpRequest' in this ?
|
9
9
|
XMLHttpRequest :
|
10
10
|
function(){}
|
11
|
-
|
11
|
+
var OriginalActiveXObject = 'ActiveXObject' in this ?
|
12
|
+
ActiveXObject :
|
13
|
+
undefined
|
14
|
+
|
12
15
|
// --- MockXMLHttpRequest
|
13
16
|
|
14
17
|
var MockXMLHttpRequest = function() {
|
@@ -66,11 +69,15 @@
|
|
66
69
|
*/
|
67
70
|
|
68
71
|
send : function(data) {
|
72
|
+
var self = this
|
69
73
|
this.data = data
|
70
74
|
this.readyState = 4
|
71
75
|
if (this.method == 'HEAD') this.responseText = null
|
72
76
|
this.responseHeaders['content-length'] = (this.responseText || '').length
|
73
77
|
if(this.async) this.onreadystatechange()
|
78
|
+
lastRequest = function(){
|
79
|
+
return self
|
80
|
+
}
|
74
81
|
}
|
75
82
|
}
|
76
83
|
|
@@ -132,6 +139,7 @@
|
|
132
139
|
function mockRequest() {
|
133
140
|
return { and_return : function(body, type, status, headers) {
|
134
141
|
XMLHttpRequest = MockXMLHttpRequest
|
142
|
+
ActiveXObject = false
|
135
143
|
status = status || 200
|
136
144
|
headers = headers || {}
|
137
145
|
headers['content-type'] = type
|
@@ -152,6 +160,7 @@
|
|
152
160
|
|
153
161
|
function unmockRequest() {
|
154
162
|
XMLHttpRequest = OriginalXMLHttpRequest
|
163
|
+
ActiveXObject = OriginalActiveXObject
|
155
164
|
}
|
156
165
|
|
157
166
|
JSpec.include({
|
@@ -175,7 +184,8 @@
|
|
175
184
|
DSLs : {
|
176
185
|
snake : {
|
177
186
|
mock_request: mockRequest,
|
178
|
-
unmock_request: unmockRequest
|
187
|
+
unmock_request: unmockRequest,
|
188
|
+
last_request: function(){ return lastRequest() }
|
179
189
|
}
|
180
190
|
}
|
181
191
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
# uncomment and call with `$ jspec example `
|
3
|
+
|
4
|
+
# command :example do |c|
|
5
|
+
# c.syntax = 'jspec example [options]'
|
6
|
+
# c.description = 'Just an example command'
|
7
|
+
# c.option '-f', '--foo string', 'Does some foo with <string>'
|
8
|
+
# c.option '-b', '--bar [string]', 'Does some bar with [string]'
|
9
|
+
# c.example 'Do some foo', 'jspec example --foo bar'
|
10
|
+
# c.example 'Do some bar', 'jspec example --bar'
|
11
|
+
# c.when_called do |args, options|
|
12
|
+
# p args
|
13
|
+
# p options.__hash__
|
14
|
+
# # options.foo
|
15
|
+
# # options.bar
|
16
|
+
# # options.__hash__[:foo]
|
17
|
+
# # options.__hash__[:bar]
|
18
|
+
# end
|
19
|
+
# end
|
data/spec/dom.html
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<link type="text/css" rel="stylesheet" href="../lib/jspec.css" />
|
4
|
+
<script src="support/jquery.js"></script>
|
5
|
+
<script src="../lib/jspec.js"></script>
|
6
|
+
<script src="../lib/jspec.jquery.js"></script>
|
7
|
+
<script src="../lib/jspec.xhr.js"></script>
|
8
|
+
<script src="unit/helpers.js"></script>
|
9
|
+
<script src="unit/spec.grammar-less.js"></script>
|
10
|
+
<script>
|
11
|
+
function runSuites() {
|
12
|
+
JSpec
|
13
|
+
.exec('unit/spec.grammar.js')
|
14
|
+
.exec('unit/spec.js')
|
15
|
+
.exec('unit/spec.matchers.js')
|
16
|
+
.exec('unit/spec.utils.js')
|
17
|
+
.exec('unit/spec.fixtures.js')
|
18
|
+
.exec('unit/spec.shared-behaviors.js')
|
19
|
+
.exec('unit/spec.jquery.js')
|
20
|
+
.exec('unit/spec.modules.js')
|
21
|
+
.exec('unit/spec.xhr.js')
|
22
|
+
.exec('unit/spec.jquery.xhr.js')
|
23
|
+
.run({ failuresOnly: true, fixturePath: 'fixtures' })
|
24
|
+
.report()
|
25
|
+
}
|
26
|
+
</script>
|
27
|
+
</head>
|
28
|
+
<body class="jspec" onLoad="runSuites();">
|
29
|
+
<div id="jspec-top"><h2 id="jspec-title">JSpec <em><script>document.write(JSpec.version)</script></em></h2></div>
|
30
|
+
<div id="jspec"><div class="loading"></div></div>
|
31
|
+
<div id="jspec-bottom"></div>
|
32
|
+
</body>
|
33
|
+
</html>
|
data/spec/node.js
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
require.paths.unshift('./lib', './spec');
|
3
|
+
process.mixin(require('sys'))
|
4
|
+
|
5
|
+
require("jspec")
|
6
|
+
require("unit/helpers")
|
7
|
+
|
8
|
+
quit = process.exit
|
9
|
+
print = puts
|
10
|
+
|
11
|
+
readFile = function(path) {
|
12
|
+
var promise = require('posix').cat(path, "utf8")
|
13
|
+
var result = ''
|
14
|
+
promise.addErrback(function(){ throw new Error("failed to read file `" + path + "'") })
|
15
|
+
promise.addCallback(function(contents){
|
16
|
+
result = contents
|
17
|
+
})
|
18
|
+
promise.wait()
|
19
|
+
return result
|
20
|
+
}
|
21
|
+
|
22
|
+
JSpec
|
23
|
+
.exec('spec/unit/spec.js')
|
24
|
+
.exec('spec/unit/spec.utils.js')
|
25
|
+
.exec('spec/unit/spec.modules.js')
|
26
|
+
.exec('spec/unit/spec.matchers.js')
|
27
|
+
.exec('spec/unit/spec.shared-behaviors.js')
|
28
|
+
.exec('spec/unit/spec.grammar.js')
|
29
|
+
.exec('spec/unit/spec.grammar-less.js')
|
30
|
+
//.exec('spec/unit/spec.fixtures.js') TODO: when exceptions bubble properly uncomment
|
31
|
+
.run({ reporter: JSpec.reporters.Terminal, failuresOnly: true, fixturePath: 'spec/fixtures' })
|
32
|
+
.report()
|
data/spec/rhino.js
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
load('spec/support/env.js')
|
3
|
+
Envjs('spec/fixtures/test.html')
|
4
|
+
load('spec/support/jquery.js')
|
5
|
+
load('lib/jspec.js')
|
6
|
+
load('lib/jspec.xhr.js')
|
7
|
+
load('lib/jspec.growl.js')
|
8
|
+
load('lib/jspec.jquery.js')
|
9
|
+
load('spec/unit/helpers.js')
|
10
|
+
load('spec/unit/spec.grammar-less.js')
|
11
|
+
|
12
|
+
JSpec
|
13
|
+
.exec('spec/unit/spec.grammar.js')
|
14
|
+
.exec('spec/unit/spec.js')
|
15
|
+
.exec('spec/unit/spec.matchers.js')
|
16
|
+
.exec('spec/unit/spec.utils.js')
|
17
|
+
.exec('spec/unit/spec.jquery.js')
|
18
|
+
.exec('spec/unit/spec.fixtures.js')
|
19
|
+
.exec('spec/unit/spec.shared-behaviors.js')
|
20
|
+
.exec('spec/unit/spec.modules.js')
|
21
|
+
.exec('spec/unit/spec.xhr.js')
|
22
|
+
.exec('spec/unit/spec.jquery.xhr.js')
|
23
|
+
.run({ reporter: JSpec.reporters.Terminal, failuresOnly: true, fixturePath: 'spec/fixtures' })
|
24
|
+
.report()
|
@@ -0,0 +1,101 @@
|
|
1
|
+
|
2
|
+
include FileUtils
|
3
|
+
|
4
|
+
describe "jspec" do
|
5
|
+
describe "init" do
|
6
|
+
before :each do
|
7
|
+
@dest = File.dirname(__FILE__) + '/test'
|
8
|
+
mkdir @dest
|
9
|
+
end
|
10
|
+
|
11
|
+
after :each do
|
12
|
+
rm_rf @dest
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should initialize a default project at the current directory when no destination is passed" do
|
16
|
+
Dir.chdir @dest do
|
17
|
+
jspec(:init)
|
18
|
+
File.directory?(@dest).should be_true
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should initialize a default project at the given path" do
|
23
|
+
jspec(:init, @dest).should include('ruby/bin/test')
|
24
|
+
File.directory?(@dest).should be_true
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should initialize a rails project when using -R or --rails" do
|
28
|
+
mkdir @dest + '/vendor'
|
29
|
+
jspec(:init, @dest, '--rails')
|
30
|
+
File.directory?(@dest).should be_true
|
31
|
+
File.directory?(@dest + '/jspec').should be_true
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should initialize a rails project without --rails when the destination looks like a rails app" do
|
35
|
+
mkdir @dest + '/vendor'
|
36
|
+
jspec(:init, @dest)
|
37
|
+
File.directory?(@dest).should be_true
|
38
|
+
File.directory?(@dest + '/jspec').should be_true
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should symlink jspec's library to spec/lib when using --symlink" do
|
42
|
+
jspec(:init, @dest, '--symlink')
|
43
|
+
File.directory?(@dest).should be_true
|
44
|
+
File.symlink?(@dest + '/spec/lib').should be_true
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should symlink jspec's library to jspec/lib when using --symlink and --rails" do
|
48
|
+
mkdir @dest + '/vendor'
|
49
|
+
jspec(:init, @dest, '--symlink', '--rails')
|
50
|
+
File.directory?(@dest).should be_true
|
51
|
+
File.directory?(@dest + '/jspec').should be_true
|
52
|
+
File.symlink?(@dest + '/jspec/lib').should be_true
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should vendorize jspec's library to spec/lib when using --freeze" do
|
56
|
+
jspec(:init, @dest, '--freeze')
|
57
|
+
File.directory?(@dest).should be_true
|
58
|
+
File.directory?(@dest + '/spec/lib').should be_true
|
59
|
+
File.exists?(@dest + '/spec/lib/jspec.js').should be_true
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should vendor jspec's library to jspec/lib when using --freeze and --rails" do
|
63
|
+
mkdir @dest + '/vendor'
|
64
|
+
jspec(:init, @dest, '--freeze', '--rails')
|
65
|
+
File.directory?(@dest).should be_true
|
66
|
+
File.directory?(@dest + '/jspec').should be_true
|
67
|
+
File.directory?(@dest + '/jspec/lib').should be_true
|
68
|
+
File.exists?(@dest + '/jspec/lib/jspec.js').should be_true
|
69
|
+
end
|
70
|
+
|
71
|
+
it "should set jspec's DOM root to jspec's gem directory" do
|
72
|
+
jspec(:init, @dest)
|
73
|
+
File.read(@dest + '/spec/dom.html').should include('src="/')
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should set jspec's DOM root to ../lib/ when using --freeze" do
|
77
|
+
jspec(:init, @dest, '--freeze')
|
78
|
+
File.read(@dest + '/spec/dom.html').should include('src="./lib/jspec.js')
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should set jspec's DOM root to ../lib/ when using --symlink" do
|
82
|
+
jspec(:init, @dest, '--symlink')
|
83
|
+
File.read(@dest + '/spec/dom.html').should include('src="./lib/jspec.js')
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should set jspec's Rhino root to jspec's gem directory" do
|
87
|
+
jspec(:init, @dest)
|
88
|
+
File.read(@dest + '/spec/rhino.js').should_not include("load('./spec/lib/jspec.js')")
|
89
|
+
end
|
90
|
+
|
91
|
+
it "should set jspec's Rhino root to ./spec/lib/ when using --freeze" do
|
92
|
+
jspec(:init, @dest, '--freeze')
|
93
|
+
File.read(@dest + '/spec/rhino.js').should include("load('./spec/lib/jspec.js')")
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should set jspec's Rhino root to ./spec/lib/ when using --symlink" do
|
97
|
+
jspec(:init, @dest, '--symlink')
|
98
|
+
File.read(@dest + '/spec/rhino.js').should include("load('./spec/lib/jspec.js')")
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
|
2
|
+
include FileUtils
|
3
|
+
|
4
|
+
describe "jspec" do
|
5
|
+
describe "install" do
|
6
|
+
before :each do
|
7
|
+
@dest = File.dirname(__FILE__) + '/test'
|
8
|
+
mkdir @dest
|
9
|
+
jspec(:init, @dest)
|
10
|
+
end
|
11
|
+
|
12
|
+
after :each do
|
13
|
+
rm_rf @dest
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "jquery" do
|
17
|
+
it "should install to spec/support/jquery.js by default" do
|
18
|
+
Dir.chdir @dest do
|
19
|
+
jspec(:install, 'jquery')
|
20
|
+
File.exists?('spec/support/jquery.js').should be_true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should install to the destination passed" do
|
25
|
+
jspec(:install, 'jquery', "#{@dest}/spec")
|
26
|
+
File.exists?("#{@dest}/spec/jquery.js").should be_true
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should install specific versions" do
|
30
|
+
Dir.chdir @dest do
|
31
|
+
jspec(:install, 'jquery', '--release', '1.3.1')
|
32
|
+
File.exists?('spec/support/jquery.js').should be_true
|
33
|
+
File.read('spec/support/jquery.js').should include('1.3.1')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "jqueryui" do
|
39
|
+
it "should install to spec/support/jquery.ui.js by default" do
|
40
|
+
Dir.chdir @dest do
|
41
|
+
jspec(:install, 'jqueryui')
|
42
|
+
File.exists?('spec/support/jquery.ui.js').should be_true
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should install to the destination passed" do
|
47
|
+
jspec(:install, 'jqueryui', "#{@dest}/spec")
|
48
|
+
File.exists?("#{@dest}/spec/jquery.ui.js").should be_true
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should install specific versions" do
|
52
|
+
Dir.chdir @dest do
|
53
|
+
jspec(:install, 'jqueryui', '--release', '1.6')
|
54
|
+
File.exists?('spec/support/jquery.ui.js').should be_true
|
55
|
+
File.read('spec/support/jquery.ui.js').should include('1.6')
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "prototype" do
|
61
|
+
it "should install to spec/support/prototype.js by default" do
|
62
|
+
Dir.chdir @dest do
|
63
|
+
jspec(:install, 'prototype')
|
64
|
+
File.exists?('spec/support/prototype.js').should be_true
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should install to the destination passed" do
|
69
|
+
jspec(:install, 'prototype', "#{@dest}/spec")
|
70
|
+
File.exists?("#{@dest}/spec/prototype.js").should be_true
|
71
|
+
end
|
72
|
+
|
73
|
+
it "should install specific versions" do
|
74
|
+
Dir.chdir @dest do
|
75
|
+
jspec(:install, 'prototype', '--release', '1.6.0.2')
|
76
|
+
File.exists?('spec/support/prototype.js').should be_true
|
77
|
+
File.read('spec/support/prototype.js').should include('1.6.0.2')
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "mootools" do
|
83
|
+
it "should install to spec/support/mootools.js by default" do
|
84
|
+
Dir.chdir @dest do
|
85
|
+
jspec(:install, 'mootools')
|
86
|
+
File.exists?('spec/support/mootools.js').should be_true
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
it "should install to the destination passed" do
|
91
|
+
jspec(:install, 'mootools', "#{@dest}/spec")
|
92
|
+
File.exists?("#{@dest}/spec/mootools.js").should be_true
|
93
|
+
end
|
94
|
+
|
95
|
+
it "should install specific versions" do
|
96
|
+
Dir.chdir @dest do
|
97
|
+
jspec(:install, 'mootools', '--release', '1.2.1')
|
98
|
+
File.exists?('spec/support/mootools.js').should be_true
|
99
|
+
File.read('spec/support/mootools.js').should include('1.2.1')
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
describe "envjs" do
|
105
|
+
it "should install to spec/support/env.js by default" do
|
106
|
+
Dir.chdir @dest do
|
107
|
+
jspec(:install, 'envjs')
|
108
|
+
File.exists?('spec/support/env.js').should be_true
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should install to the destination passed" do
|
113
|
+
jspec(:install, 'envjs', "#{@dest}/spec")
|
114
|
+
File.exists?("#{@dest}/spec/env.js").should be_true
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
describe "dojo" do
|
119
|
+
it "should install to spec/support/dojo.js by default" do
|
120
|
+
Dir.chdir @dest do
|
121
|
+
jspec(:install, 'dojo')
|
122
|
+
File.exists?('spec/support/dojo.js').should be_true
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
it "should install to the destination passed" do
|
127
|
+
jspec(:install, 'dojo', "#{@dest}/spec")
|
128
|
+
File.exists?("#{@dest}/spec/dojo.js").should be_true
|
129
|
+
end
|
130
|
+
|
131
|
+
it "should install specific versions" do
|
132
|
+
Dir.chdir @dest do
|
133
|
+
jspec(:install, 'dojo', '--release', '1.1.1')
|
134
|
+
File.exists?('spec/support/dojo.js').should be_true
|
135
|
+
File.read('spec/support/dojo.js').should include('1.1.1')
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
end
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
# describe "jspec" do
|
3
|
+
# describe "shell" do
|
4
|
+
# it "should load jspec.js" do
|
5
|
+
# shell('print(JSpec.version)', 'quit()').should include('JSpec')
|
6
|
+
# end
|
7
|
+
#
|
8
|
+
# it "should quit when quit or exit commands are called" do
|
9
|
+
# shell('print(JSpec.version)', 'quit').should include('JSpec')
|
10
|
+
# shell('print(JSpec.version)', 'exit').should include('JSpec')
|
11
|
+
# end
|
12
|
+
# end
|
13
|
+
# end
|