ghostbuster 0.3.1 → 0.3.2
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/Rakefile +1 -1
- data/lib/ghostbuster.coffee +5 -5
- data/lib/ghostbuster/version.rb +1 -1
- data/test/non_working_ghost/test_ghost.coffee +4 -1
- metadata +16 -16
data/Rakefile
CHANGED
@@ -36,7 +36,7 @@ namespace :test do
|
|
36
36
|
task :non_working do
|
37
37
|
print "non_working_ghost ... "
|
38
38
|
Dir.chdir("test/non_working_ghost") do
|
39
|
-
matcher = [/0 success,
|
39
|
+
matcher = [/0 success, 7 failure, 1 pending/, /Bad link traversal\s+Assert location failed: Excepted http:\/\/127\.0\.0\.1:4567\/not-correct, got http:\/\/127\.0\.0\.1:4567\//, /Form input not equal\s+Assert first for selector #out did not meet expectations/, /To an invalid URL\s+The request for http:\/\/127\.0\.0\.1:this-url-is-invalid failed/, /This test will explode!\s+I hate you!/, /This test has no succeed\s+This test took too long/]
|
40
40
|
fork {
|
41
41
|
ENV['BUNDLE_GEMFILE'] = File.expand_path("./Gemfile")
|
42
42
|
`bundle install`
|
data/lib/ghostbuster.coffee
CHANGED
@@ -40,8 +40,7 @@ class Test
|
|
40
40
|
startTestTimer: ->
|
41
41
|
test = this
|
42
42
|
@testTimer ||= setTimeout (->
|
43
|
-
test.
|
44
|
-
test.fail()
|
43
|
+
test.fail("This test took too long")
|
45
44
|
), @maxDuration
|
46
45
|
runWithFunction: (fn, @callback) ->
|
47
46
|
fn.call(this)
|
@@ -52,7 +51,7 @@ class Test
|
|
52
51
|
@waitForAssertions ->
|
53
52
|
test = this
|
54
53
|
fatalCallback = ->
|
55
|
-
test.fail("The request for #{test.runner.normalizePath(path)}
|
54
|
+
test.fail("The request for #{test.runner.normalizePath(path)} timed out")
|
56
55
|
fatal = setTimeout fatalCallback, if opts.total then opts.total * 1000 else 1000
|
57
56
|
loadedCallback = (status) ->
|
58
57
|
clearTimeout fatal
|
@@ -65,7 +64,7 @@ class Test
|
|
65
64
|
test.body = new Body(test)
|
66
65
|
getCallback.call(test) if getCallback
|
67
66
|
when 'fail'
|
68
|
-
test.fail()
|
67
|
+
test.fail("The request for #{test.runner.normalizePath(path)} failed")
|
69
68
|
@page.open @runner.normalizePath(path), loadedCallback
|
70
69
|
succeed: ->
|
71
70
|
@waitForAssertions ->
|
@@ -290,7 +289,8 @@ class TestFile
|
|
290
289
|
return
|
291
290
|
processBefore 0, ->
|
292
291
|
try
|
293
|
-
test.run (state) ->
|
292
|
+
test.run (state, msg) ->
|
293
|
+
testFile.lastErrors[test.name] = msg
|
294
294
|
testStates[test.name] = state
|
295
295
|
nextTest(count + 1)
|
296
296
|
catch e
|
data/lib/ghostbuster/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghostbuster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Josh Hull
|
@@ -15,13 +15,12 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-08 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name: thin
|
23
22
|
prerelease: false
|
24
|
-
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
24
|
none: false
|
26
25
|
requirements:
|
27
26
|
- - ~>
|
@@ -32,12 +31,12 @@ dependencies:
|
|
32
31
|
- 2
|
33
32
|
- 11
|
34
33
|
version: 1.2.11
|
34
|
+
requirement: *id001
|
35
|
+
name: thin
|
35
36
|
type: :development
|
36
|
-
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
name: rake
|
39
38
|
prerelease: false
|
40
|
-
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
41
40
|
none: false
|
42
41
|
requirements:
|
43
42
|
- - ~>
|
@@ -48,12 +47,12 @@ dependencies:
|
|
48
47
|
- 8
|
49
48
|
- 7
|
50
49
|
version: 0.8.7
|
50
|
+
requirement: *id002
|
51
|
+
name: rake
|
51
52
|
type: :development
|
52
|
-
version_requirements: *id002
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
-
name: bundler
|
55
54
|
prerelease: false
|
56
|
-
|
55
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
57
56
|
none: false
|
58
57
|
requirements:
|
59
58
|
- - ~>
|
@@ -64,12 +63,12 @@ dependencies:
|
|
64
63
|
- 0
|
65
64
|
- 14
|
66
65
|
version: 1.0.14
|
66
|
+
requirement: *id003
|
67
|
+
name: bundler
|
67
68
|
type: :development
|
68
|
-
version_requirements: *id003
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: sinatra
|
71
70
|
prerelease: false
|
72
|
-
|
71
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
73
|
requirements:
|
75
74
|
- - ">="
|
@@ -78,8 +77,9 @@ dependencies:
|
|
78
77
|
segments:
|
79
78
|
- 0
|
80
79
|
version: "0"
|
80
|
+
requirement: *id004
|
81
|
+
name: sinatra
|
81
82
|
type: :development
|
82
|
-
version_requirements: *id004
|
83
83
|
description: Integration testing ftw.
|
84
84
|
email:
|
85
85
|
- joshbuddy@gmail.com
|