jspec 4.0.0 → 4.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/History.md CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ 4.1.0 / 2010-03-25
3
+ ==================
4
+
5
+ * Added jspec.nodejs.js - have_prototype matcher
6
+ * Added jspec.nodejs.js - have_keys matcher
7
+ * Added jspec.nodejs.js - have_configurable_property matcher
8
+ * Added jspec.nodejs.js - have_writable_property matcher
9
+ * Added jspec.nodejs.js
10
+ * Remove unused error() method
11
+
2
12
  4.0.0 / 2010-03-22
3
13
  ==================
4
14
 
data/Manifest CHANGED
@@ -14,6 +14,7 @@ lib/jspec.css
14
14
  lib/jspec.growl.js
15
15
  lib/jspec.jquery.js
16
16
  lib/jspec.js
17
+ lib/jspec.nodejs.js
17
18
  lib/jspec.shell.js
18
19
  lib/jspec.timers.js
19
20
  lib/jspec.xhr.js
@@ -43,6 +44,7 @@ spec/unit/spec.jquery.xhr.js
43
44
  spec/unit/spec.js
44
45
  spec/unit/spec.matchers.js
45
46
  spec/unit/spec.modules.js
47
+ spec/unit/spec.node.js
46
48
  spec/unit/spec.shared-behaviors.js
47
49
  spec/unit/spec.utils.js
48
50
  spec/unit/spec.xhr.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, '4.0.0'
15
+ program :version, '4.1.0'
16
16
  program :description, 'JavaScript BDD Testing Framework'
17
17
  default_command :bind
18
18
 
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 = "4.0.0"
5
+ s.version = "4.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-03-22}
9
+ s.date = %q{2010-03-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}
13
13
  s.executables = ["jspec"]
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/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"]
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.nodejs.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.nodejs.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.node.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"]
data/lib/jspec.js CHANGED
@@ -4,7 +4,7 @@
4
4
  ;(function(){
5
5
 
6
6
  JSpec = {
7
- version : '4.0.0',
7
+ version : '4.1.0',
8
8
  assert : true,
9
9
  cache : {},
10
10
  suites : [],
@@ -1608,19 +1608,6 @@
1608
1608
  })
1609
1609
  },
1610
1610
 
1611
- /**
1612
- * Throw a JSpec related error.
1613
- *
1614
- * @param {string} message
1615
- * @param {Exception} e
1616
- * @api public
1617
- */
1618
-
1619
- error : function(message, e) {
1620
- throw (message ? message : '') + e.toString() +
1621
- (e.line ? ' near line ' + e.line : '')
1622
- },
1623
-
1624
1611
  /**
1625
1612
  * Ad-hoc POST request for JSpec server usage.
1626
1613
  *
@@ -0,0 +1,18 @@
1
+
2
+ // JSpec - node - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
3
+
4
+ JSpec
5
+ .include({
6
+ name: 'node',
7
+
8
+ // --- Matchers
9
+
10
+ matchers : {
11
+ have_enumerable_property: 'actual.propertyIsEnumerable(expected)',
12
+ have_writable_property: 'Object.getOwnPropertyDescriptor(actual, expected).writable === true',
13
+ have_configurable_property: 'Object.getOwnPropertyDescriptor(actual, expected).configurable === true',
14
+ have_keys: 'does(Object.keys(actual), "eql", expected)',
15
+ have_prototype: 'Object.getPrototypeOf(actual) === expected'
16
+ }
17
+ })
18
+
data/spec/node.js CHANGED
@@ -2,10 +2,12 @@
2
2
  require.paths.unshift('./lib', './spec');
3
3
 
4
4
  require("jspec")
5
+ require("jspec.nodejs")
5
6
  require("unit/helpers")
6
7
 
7
8
  JSpec
8
9
  .exec('spec/unit/spec.js')
10
+ .exec('spec/unit/spec.node.js')
9
11
  .exec('spec/unit/spec.utils.js')
10
12
  .exec('spec/unit/spec.modules.js')
11
13
  .exec('spec/unit/spec.matchers.js')
@@ -0,0 +1,45 @@
1
+
2
+ describe 'node'
3
+ describe 'matchers'
4
+ describe 'have_enumerable_property'
5
+ it 'should check if a property is enumerable'
6
+ { foo: 'bar' }.should.have_enumerable_property 'foo'
7
+ var o = {}
8
+ Object.defineProperty(o, 'foo', { value: 'bar', enumerable: false })
9
+ o.should.not.have_enumerable_property 'bar'
10
+ end
11
+ end
12
+
13
+ describe 'have_writable_property'
14
+ it 'should check if a property is writable'
15
+ { foo: 'bar' }.should.have_writable_property 'foo'
16
+ var o = {}
17
+ Object.defineProperty(o, 'foo', { value: 'bar', writable: false })
18
+ o.should.not.have_writable_property 'foo'
19
+ end
20
+ end
21
+
22
+ describe 'have_configurable_property'
23
+ it 'should check if a property is configurable'
24
+ { foo: 'bar' }.should.have_configurable_property 'foo'
25
+ var o = {}
26
+ Object.defineProperty(o, 'foo', { value: 'bar', configurable: false })
27
+ o.should.not.have_configurable_property 'foo'
28
+ end
29
+ end
30
+
31
+ describe 'have_keys'
32
+ it 'should check if keys match'
33
+ { foo: 'bar' }.should.have_keys ['foo']
34
+ { bar: 'baz' }.should.not.have_keys ['foo']
35
+ end
36
+ end
37
+
38
+ describe 'have_prototype'
39
+ [].should.have_prototype Array.prototype
40
+ {}.should.not.have_prototype Array.prototype
41
+ {}.should.have_prototype Object.prototype
42
+ end
43
+
44
+ end
45
+ end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 4
7
+ - 1
7
8
  - 0
8
- - 0
9
- version: 4.0.0
9
+ version: 4.1.0
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-03-22 00:00:00 -07:00
17
+ date: 2010-03-25 00:00:00 -07:00
18
18
  default_executable: jspec
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -88,6 +88,7 @@ extra_rdoc_files:
88
88
  - lib/jspec.growl.js
89
89
  - lib/jspec.jquery.js
90
90
  - lib/jspec.js
91
+ - lib/jspec.nodejs.js
91
92
  - lib/jspec.shell.js
92
93
  - lib/jspec.timers.js
93
94
  - lib/jspec.xhr.js
@@ -108,6 +109,7 @@ files:
108
109
  - lib/jspec.growl.js
109
110
  - lib/jspec.jquery.js
110
111
  - lib/jspec.js
112
+ - lib/jspec.nodejs.js
111
113
  - lib/jspec.shell.js
112
114
  - lib/jspec.timers.js
113
115
  - lib/jspec.xhr.js
@@ -137,6 +139,7 @@ files:
137
139
  - spec/unit/spec.js
138
140
  - spec/unit/spec.matchers.js
139
141
  - spec/unit/spec.modules.js
142
+ - spec/unit/spec.node.js
140
143
  - spec/unit/spec.shared-behaviors.js
141
144
  - spec/unit/spec.utils.js
142
145
  - spec/unit/spec.xhr.js