jspec 2.11.7 → 2.11.8
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.rdoc +5 -0
- data/README.rdoc +0 -3
- data/bin/jspec +1 -1
- data/jspec.gemspec +2 -2
- data/lib/jspec.js +4 -3
- data/spec/spec.grammar.js +16 -0
- metadata +2 -2
data/History.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -756,9 +756,6 @@ your spec/server.rb file may support additional browsers.
|
|
756
756
|
|
757
757
|
== Known Issues
|
758
758
|
|
759
|
-
* Tabs may cause a parse error. To prevent this use 'soft tabs' (setting in your IDE/Editor)
|
760
|
-
or use JSpec's grammar-less alternative (mentioned above).
|
761
|
-
|
762
759
|
* The preprocessor is not (yet) capable of multiline conversions. For example the following is invalid
|
763
760
|
|
764
761
|
object.stub('getContentsOfURL').and_return(function(url){
|
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 = "2.11.
|
5
|
+
s.version = "2.11.8"
|
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{2009-10-
|
9
|
+
s.date = %q{2009-10-16}
|
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}
|
data/lib/jspec.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
JSpec = {
|
7
7
|
|
8
|
-
version : '2.11.
|
8
|
+
version : '2.11.8',
|
9
9
|
cache : {},
|
10
10
|
suites : [],
|
11
11
|
modules : [],
|
@@ -1338,11 +1338,12 @@
|
|
1338
1338
|
if (typeof input != 'string') return
|
1339
1339
|
input = hookImmutable('preprocessing', input)
|
1340
1340
|
return input.
|
1341
|
-
replace(/\
|
1341
|
+
replace(/\t/gm, ' ').
|
1342
|
+
replace(/\r\n|\n|\r/gm, '\n').
|
1342
1343
|
replace(/([\w\.]+)\.(stub|destub)\((.*?)\)$/gm, '$2($1, $3)').
|
1343
1344
|
replace(/describe\s+(.*?)$/gm, 'describe($1, function(){').
|
1344
1345
|
replace(/^\s+it\s+(.*?)$/gm, ' it($1, function(){').
|
1345
|
-
replace(
|
1346
|
+
replace(/^ *(before_each|after_each|before|after)(?= |\n|$)/gm, 'JSpec.currentSuite.addHook("$1", function(){').
|
1346
1347
|
replace(/^\s*end(?=\s|$)/gm, '});').
|
1347
1348
|
replace(/-\{/g, 'function(){').
|
1348
1349
|
replace(/(\d+)\.\.(\d+)/g, function(_, a, b){ return range(a, b) }).
|
data/spec/spec.grammar.js
CHANGED
@@ -106,6 +106,22 @@ describe 'Grammar'
|
|
106
106
|
'bar'.should.not.equal 'foo'
|
107
107
|
end
|
108
108
|
|
109
|
+
describe 'with tabs'
|
110
|
+
before_each
|
111
|
+
foo = 'bar'
|
112
|
+
end
|
113
|
+
|
114
|
+
it 'should work'
|
115
|
+
foo.should.eql 'bar'
|
116
|
+
end
|
117
|
+
|
118
|
+
it 'should work'
|
119
|
+
true.should.be true
|
120
|
+
true.should.be(true)
|
121
|
+
true.should.be(true);
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
109
125
|
describe 'with nested describe'
|
110
126
|
it 'should work'
|
111
127
|
true.should.be_true
|
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: 2.11.
|
4
|
+
version: 2.11.8
|
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: 2009-10-
|
12
|
+
date: 2009-10-16 00:00:00 -07:00
|
13
13
|
default_executable: jspec
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|