ghostbuster 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
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, 6 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/, /This test will explode!\s+I hate you!/, /This test has no succeed\s+This test took too long/]
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`
@@ -40,8 +40,7 @@ class Test
40
40
  startTestTimer: ->
41
41
  test = this
42
42
  @testTimer ||= setTimeout (->
43
- test.setLastError("This test took too long")
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)} failed")
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
@@ -1,3 +1,3 @@
1
1
  class Ghostbuster
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -17,4 +17,7 @@ phantom.test.add "Form input not equal", ->
17
17
  phantom.test.addPending "To a non existent page", ->
18
18
  @get '/404', ->
19
19
  @succeed()
20
-
20
+
21
+ phantom.test.add "To an invalid URL", ->
22
+ @get 'http://127.0.0.1:this-url-is-invalid', ->
23
+ @succeed()
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: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
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-02 00:00:00 -05:00
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
- requirement: &id001 !ruby/object:Gem::Requirement
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
- requirement: &id002 !ruby/object:Gem::Requirement
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
- requirement: &id003 !ruby/object:Gem::Requirement
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
- requirement: &id004 !ruby/object:Gem::Requirement
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