jspec 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 3.3.1 / 2010-02-22
3
+ ==================
4
+
5
+ * Added have_any matcher
6
+ * Fixed; using readFileSync for node.js support
7
+
2
8
  3.3.0 / 2010-02-16
3
9
  ==================
4
10
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{jspec}
5
- s.version = "3.3.0"
5
+ s.version = "3.3.1"
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-16}
9
+ s.date = %q{2010-02-22}
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}
@@ -25,14 +25,15 @@ JSpec
25
25
  // --- Matchers
26
26
 
27
27
  matchers : {
28
- have_tag : "jQuery(expected, actual).length == 1",
28
+ have_tag : "jQuery(expected, actual).length === 1",
29
29
  have_one : "alias have_tag",
30
30
  have_tags : "jQuery(expected, actual).length > 1",
31
31
  have_many : "alias have_tags",
32
- have_child : "jQuery(actual).children(expected).length == 1",
32
+ have_any : "alias have_tags",
33
+ have_child : "jQuery(actual).children(expected).length === 1",
33
34
  have_children : "jQuery(actual).children(expected).length > 1",
34
- have_text : "jQuery(actual).text() == expected",
35
- have_value : "jQuery(actual).val() == expected",
35
+ have_text : "jQuery(actual).text() === expected",
36
+ have_value : "jQuery(actual).val() === expected",
36
37
  be_enabled : "!jQuery(actual).attr('disabled')",
37
38
  have_class : "jQuery(actual).hasClass(expected)",
38
39
 
@@ -4,7 +4,7 @@
4
4
  ;(function(){
5
5
 
6
6
  JSpec = {
7
- version : '3.3.0',
7
+ version : '3.3.1',
8
8
  assert : true,
9
9
  cache : {},
10
10
  suites : [],
@@ -1615,18 +1615,12 @@
1615
1615
  // --- Node.js support
1616
1616
 
1617
1617
  if (typeof GLOBAL === 'object' && typeof exports === 'object') {
1618
- var posix = require('posix')
1618
+ var fs = require('fs')
1619
1619
  quit = process.exit
1620
1620
  print = require('sys').puts
1621
1621
 
1622
1622
  readFile = function(path) {
1623
- var result
1624
- posix
1625
- .cat(path, "utf8")
1626
- .addCallback(function(contents){ result = contents })
1627
- .addErrback(function(){ throw new Error("failed to read file `" + path + "'") })
1628
- .wait()
1629
- return result
1623
+ return fs.readFileSync(path)
1630
1624
  }
1631
1625
  }
1632
1626
 
@@ -1762,4 +1756,4 @@
1762
1756
  }
1763
1757
  })
1764
1758
 
1765
- })()
1759
+ })()
@@ -47,11 +47,13 @@ describe 'jQuery'
47
47
  end
48
48
  end
49
49
 
50
- describe 'have_tags / have_many'
50
+ describe 'have_tags / have_many / have_any'
51
51
  it 'should check if more than one child is present'
52
52
  elem.should.have_tags 'option'
53
53
  elem.should.have_many 'option'
54
54
  elem.should.not.have_many 'label'
55
+ elem.find('option').remove()
56
+ elem.should.not.have_any 'option'
55
57
  end
56
58
  end
57
59
 
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.3.0
4
+ version: 3.3.1
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-02-16 00:00:00 -08:00
12
+ date: 2010-02-22 00:00:00 -08:00
13
13
  default_executable: jspec
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency