jspec 3.3.2 → 3.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ 3.3.3 / 2010-03-15
3
+ ==================
4
+
5
+ * Added nodejs template. use --node
6
+
2
7
  3.3.2 / 2010-02-25
3
8
  ==================
4
9
 
data/Manifest CHANGED
@@ -64,6 +64,12 @@ templates/default/spec/server.html
64
64
  templates/default/spec/server.rb
65
65
  templates/default/spec/unit/spec.helper.js
66
66
  templates/default/spec/unit/spec.js
67
+ templates/node/History.md
68
+ templates/node/Readme.md
69
+ templates/node/lib/yourlib.js
70
+ templates/node/spec/node.js
71
+ templates/node/spec/unit/spec.helper.js
72
+ templates/node/spec/unit/spec.js
67
73
  templates/rails/commands/example_commands.rb
68
74
  templates/rails/dom.html
69
75
  templates/rails/rhino.js
data/bin/jspec CHANGED
@@ -12,7 +12,7 @@ require 'src/installables'
12
12
  require 'src/server'
13
13
 
14
14
  program :name, 'JSpec'
15
- program :version, '3.3.2'
15
+ program :version, '3.3.3'
16
16
  program :description, 'JavaScript BDD Testing Framework'
17
17
  default_command :bind
18
18
 
@@ -79,6 +79,9 @@ command :init do |c|
79
79
  when [dest] is not specified. The template includes several files for
80
80
  running via Rhino, DOM, and the JSpec Rack server.
81
81
 
82
+ JSpec is also packed with a nodejs template via --node, omitting all of the
83
+ unnecessary browser related files.
84
+
82
85
  Additional switches --freeze, and --symlink are available in order
83
86
  to preserve the version of JSpec at the time of initialization. Otherwise
84
87
  incompatibilities from later versions may prevent your suite from
@@ -86,6 +89,7 @@ command :init do |c|
86
89
 
87
90
  To update a project to the recent version of JSpec use
88
91
  `jspec help udpate` for more information.'
92
+ c.option '-n', '--node', 'Initialize nodejs template'
89
93
  c.option '-R', '--rails', 'Initialize rails template from rails root directory'
90
94
  c.option '-f', '--freeze', 'Copy the JSpec library'
91
95
  c.option '-s', '--symlink', 'Symlink the JSpec library instead of copying it'
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{jspec}
5
- s.version = "3.3.2"
5
+ s.version = "3.3.3"
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-25}
9
+ s.date = %q{2010-03-15}
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", "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"]
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/node/History.md", "templates/node/Readme.md", "templates/node/lib/yourlib.js", "templates/node/spec/node.js", "templates/node/spec/unit/spec.helper.js", "templates/node/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"]
@@ -4,7 +4,7 @@
4
4
  ;(function(){
5
5
 
6
6
  JSpec = {
7
- version : '3.3.2',
7
+ version : '3.3.3',
8
8
  assert : true,
9
9
  cache : {},
10
10
  suites : [],
@@ -40,6 +40,15 @@ describe 'jQuery'
40
40
  end
41
41
  end
42
42
 
43
+ it 'should work with getScript()'
44
+ mock_request().and_return('var foo = "bar"', 'application/javascript', 200)
45
+ var called = false
46
+ $.getScript('foobar', function(data, textStatus){
47
+ called = true
48
+ })
49
+ called.should.be_true
50
+ end
51
+
43
52
  describe '.getJSON()'
44
53
  it 'should work with mockRequest'
45
54
  mockRequest().and_return('{ foo : "bar" }')
@@ -80,7 +80,7 @@ module JSpec
80
80
 
81
81
  def init! options = {}
82
82
  verify_empty!
83
- copy_template :default
83
+ copy_template options[:node] ? :node : :default
84
84
  vendorize_with_symlink if options.include? :symlink
85
85
  vendorize_with_copy if options.include? :freeze
86
86
  replace_root
@@ -6,5 +6,5 @@ require('yourlib')
6
6
 
7
7
  JSpec
8
8
  .exec('spec/unit/spec.js')
9
- .run({ reporter: JSpec.reporters.Terminal, fixturePath: 'spec/fixtures' })
9
+ .run({ reporter: JSpec.reporters.Terminal, fixturePath: 'spec/fixtures', failuresOnly: true })
10
10
  .report()
@@ -0,0 +1,5 @@
1
+
2
+ 0.0.1 / YYYY-MM-DD
3
+ ------------------
4
+
5
+ * Initial release
@@ -0,0 +1,29 @@
1
+
2
+ # YourLib
3
+
4
+ Description
5
+
6
+ ## License
7
+
8
+ (The MIT License)
9
+
10
+ Copyright (c) 2009 Your Name <Your Email>
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining
13
+ a copy of this software and associated documentation files (the
14
+ 'Software'), to deal in the Software without restriction, including
15
+ without limitation the rights to use, copy, modify, merge, publish,
16
+ distribute, sublicense, and/or sell copies of the Software, and to
17
+ permit persons to whom the Software is furnished to do so, subject to
18
+ the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be
21
+ included in all copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
24
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
27
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
28
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,2 @@
1
+
2
+ // Your library here
@@ -0,0 +1,10 @@
1
+
2
+ require.paths.unshift('spec', 'JSPEC_ROOT/lib', 'lib')
3
+ require('jspec')
4
+ require('unit/spec.helper')
5
+ yourlib = require('yourlib')
6
+
7
+ JSpec
8
+ .exec('spec/unit/spec.js')
9
+ .run({ reporter: JSpec.reporters.Terminal, fixturePath: 'spec/fixtures', failuresOnly: true })
10
+ .report()
@@ -0,0 +1,8 @@
1
+
2
+ describe 'YourLib'
3
+ describe '.version'
4
+ it 'should be a triplet'
5
+ yourlib.version.should.match(/^\d+\.\d+\.\d+$/)
6
+ end
7
+ end
8
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 3
8
- - 2
9
- version: 3.3.2
8
+ - 3
9
+ version: 3.3.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - TJ Holowaychuk
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-02-25 00:00:00 -08:00
17
+ date: 2010-03-15 00:00:00 -07:00
18
18
  default_executable: jspec
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -158,6 +158,12 @@ files:
158
158
  - templates/default/spec/server.rb
159
159
  - templates/default/spec/unit/spec.helper.js
160
160
  - templates/default/spec/unit/spec.js
161
+ - templates/node/History.md
162
+ - templates/node/Readme.md
163
+ - templates/node/lib/yourlib.js
164
+ - templates/node/spec/node.js
165
+ - templates/node/spec/unit/spec.helper.js
166
+ - templates/node/spec/unit/spec.js
161
167
  - templates/rails/commands/example_commands.rb
162
168
  - templates/rails/dom.html
163
169
  - templates/rails/rhino.js