webr 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -68,7 +68,8 @@ module Webr::Jasmine::Reporter
68
68
  specs = runner.specs
69
69
  results = runner.results
70
70
 
71
- hours, minutes, seconds, fraction = Date.day_fraction_to_time(@finished_at - @started_at)
71
+ # #TODO: Change this. This method is private in Ruby 1.9 - which is a little weird.
72
+ hours, minutes, seconds, fraction = Date.send(:day_fraction_to_time, @finished_at - @started_at)
72
73
  time_taken = "%0.8f" % (hours*60*60 + minutes*60 + seconds + fraction.to_f)
73
74
 
74
75
  puts "Finished in #{time_taken}s"
@@ -157,8 +157,9 @@ module Webr::Jasmine::Reporter
157
157
  suites = runner.suites
158
158
  specs = runner.specs
159
159
  results = runner.results
160
-
161
- hours, minutes, seconds, fraction = Date.day_fraction_to_time(@finished_at - @started_at)
160
+
161
+ #TODO: Change this. This method is private in Ruby 1.9 - which is a little weird.
162
+ hours, minutes, seconds, fraction = Date.send(:day_fraction_to_time, @finished_at - @started_at)
162
163
  time_taken = "%0.8f" % (hours*60*60 + minutes*60 + seconds + fraction.to_f)
163
164
 
164
165
  totals = "Examples: #{specs.length}, Failure#{'s' unless results.failedCount == 1}: #{results.failedCount}"
@@ -1,3 +1,3 @@
1
1
  module Webr
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe Webr::Jasmine::Reporter::Console do
4
+
5
+ it "reports" do
6
+ output = ''
7
+ $stdout.stub(:write) { |*a| output.<<(*a) }
8
+ results = []
9
+ results.stub(:failedCount) { 0 }
10
+ runner = mock(:Runner, :suites => [], :specs => [], :results => results, :topLevelSuites => [])
11
+ reporter = Webr::Jasmine::Reporter::Console.new(nil)
12
+ reporter.reportRunnerStarting(runner)
13
+ reporter.reportRunnerResults(runner)
14
+ reporter.render_summary(runner)
15
+ output.should match /Examples: 0, Failures: 0\nFinished in/
16
+ end
17
+
18
+ end
19
+
20
+
@@ -1,8 +1,8 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe Webr::Jasmine::Reporter::Html do
4
4
 
5
- it "should create valid textmate links for a backtrace" do
5
+ it "creates valid textmate links for a backtrace" do
6
6
  reporter = Webr::Jasmine::Reporter::Html.new(nil)
7
7
  reporter.textmate_backtrace("at [object Object].<anonymous> (/Users/Daniel/playground/webr/jspec/foo_spec.js:14:15)").should ==
8
8
  "at [object Object].<anonymous> (<a href=\"txmt://open?url=file:///Users/Daniel/playground/webr/jspec/foo_spec.js&line=14\">/Users/Daniel/playground/webr/jspec/foo_spec.js:14</a>:15)"
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 7
10
- version: 0.0.7
5
+ version: 0.0.8
11
6
  platform: ruby
12
7
  authors:
13
8
  - "Dani\xC3\xABl van de Burgt"
@@ -15,95 +10,74 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-06-29 00:00:00 Z
13
+ date: 2011-07-15 00:00:00 +03:00
14
+ default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
21
- prerelease: false
17
+ name: therubyracer
22
18
  requirement: &id001 !ruby/object:Gem::Requirement
23
19
  none: false
24
20
  requirements:
25
21
  - - ~>
26
22
  - !ruby/object:Gem::Version
27
- hash: 63
28
- segments:
29
- - 0
30
- - 9
31
- - 2
32
23
  version: 0.9.2
33
24
  type: :runtime
34
- name: therubyracer
25
+ prerelease: false
35
26
  version_requirements: *id001
36
27
  - !ruby/object:Gem::Dependency
37
- prerelease: false
28
+ name: rednode
38
29
  requirement: &id002 !ruby/object:Gem::Requirement
39
30
  none: false
40
31
  requirements:
41
32
  - - ">="
42
33
  - !ruby/object:Gem::Version
43
- hash: 27
44
- segments:
45
- - 0
46
- - 1
47
- - 0
48
34
  version: 0.1.0
49
35
  type: :runtime
50
- name: rednode
36
+ prerelease: false
51
37
  version_requirements: *id002
52
38
  - !ruby/object:Gem::Dependency
53
- prerelease: false
39
+ name: eventmachine
54
40
  requirement: &id003 !ruby/object:Gem::Requirement
55
41
  none: false
56
42
  requirements:
57
43
  - - ">="
58
44
  - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
45
  version: "0"
63
46
  type: :runtime
64
- name: eventmachine
47
+ prerelease: false
65
48
  version_requirements: *id003
66
49
  - !ruby/object:Gem::Dependency
67
- prerelease: false
50
+ name: optitron
68
51
  requirement: &id004 !ruby/object:Gem::Requirement
69
52
  none: false
70
53
  requirements:
71
54
  - - ">="
72
55
  - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
56
  version: "0"
77
57
  type: :runtime
78
- name: optitron
58
+ prerelease: false
79
59
  version_requirements: *id004
80
60
  - !ruby/object:Gem::Dependency
81
- prerelease: false
61
+ name: rake
82
62
  requirement: &id005 !ruby/object:Gem::Requirement
83
63
  none: false
84
64
  requirements:
85
65
  - - ">="
86
66
  - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
67
  version: "0"
91
68
  type: :development
92
- name: rake
69
+ prerelease: false
93
70
  version_requirements: *id005
94
71
  - !ruby/object:Gem::Dependency
95
- prerelease: false
72
+ name: rspec
96
73
  requirement: &id006 !ruby/object:Gem::Requirement
97
74
  none: false
98
75
  requirements:
99
76
  - - ">="
100
77
  - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
78
  version: "0"
105
79
  type: :development
106
- name: rspec
80
+ prerelease: false
107
81
  version_requirements: *id006
108
82
  description: Test your javascript with no server, no browser, just pleasure.
109
83
  email: secretlymexico@gmail.com
@@ -114,58 +88,60 @@ extensions: []
114
88
  extra_rdoc_files: []
115
89
 
116
90
  files:
117
- - spec/spec_helper.rb
118
- - spec/data/script-external.html
119
- - spec/data/plain.html
120
- - lib/webr/jasmine.rb
91
+ - Rakefile
92
+ - README.md
93
+ - webr.gemspec
94
+ - ext/jasmine/lib/jasmine.js
121
95
  - app/webr.rb
122
- - spec/data/script-jquery.js
123
- - spec/data/script-embedded.html
124
- - ext/request/request.js
125
- - ext/node-htmlparser/lib/node-htmlparser.js
126
- - ext/jsdom/lib/jsdom/level3/events.js
127
- - ext/jsdom/lib/jsdom/level2/index.js
128
- - jspec/jasmine_spec.js
129
- - lib/webr/version.rb
130
- - lib/webr/portal.rb
96
+ - bin/webr
97
+ - js/jasmine-start.js
98
+ - js/webr.js
99
+ - lib/webr.rb
100
+ - lib/webr/browser.rb
101
+ - lib/webr/jasmine.rb
102
+ - lib/webr/jasmine/browser.rb
131
103
  - lib/webr/jasmine/reporter.rb
132
- - ext/jsdom/lib/jsdom/level2/events.js
133
- - spec/lib/webr/jasmine/reporter/html_spec.rb
134
- - spec/lib/webr/jasmine/browser_spec.rb
135
- - spec/lib/webr/browser_spec.rb
104
+ - lib/webr/jasmine/reporter/base.rb
105
+ - lib/webr/jasmine/reporter/console.rb
136
106
  - lib/webr/jasmine/reporter/html.rb
107
+ - lib/webr/portal.rb
137
108
  - lib/webr/runtime.rb
138
- - lib/webr.rb
139
- - ext/jasmine/lib/jasmine.js
140
- - ext/jsdom/lib/jsdom/level3/index.js
141
- - ext/jsdom/lib/jsdom/level2/languages/javascript.js
142
- - ext/jsdom/lib/jsdom/browser/htmlencoding.js
143
- - ext/jsdom/lib/jsdom.js
144
- - spec/data/script-jquery-1.4.3.html
145
- - spec/data/script-external.js
146
- - spec/data/script-external-onload.js
109
+ - lib/webr/version.rb
110
+ - spec/data/plain.html
111
+ - spec/data/script-embedded.html
147
112
  - spec/data/script-external-onload.html
148
- - README.md
149
- - Rakefile
150
- - ext/jsdom/lib/jsdom/level3/core.js
151
- - ext/jsdom/lib/jsdom/level1/core.js
113
+ - spec/data/script-external-onload.js
114
+ - spec/data/script-external.html
115
+ - spec/data/script-external.js
152
116
  - spec/data/script-jquery-1.4.2.html
153
- - lib/webr/jasmine/reporter/base.rb
154
- - bin/webr
155
- - webr.gemspec
156
- - ext/jsdom/lib/jsdom/level3/html.js
157
- - ext/jsdom/lib/jsdom/level2/core.js
158
- - ext/jsdom/lib/jsdom/browser/index.js
117
+ - spec/data/script-jquery-1.4.3.html
118
+ - spec/data/script-jquery.js
119
+ - spec/lib/webr/browser_spec.rb
120
+ - spec/lib/webr/jasmine/browser_spec.rb
121
+ - spec/lib/webr/jasmine/reporter/console_spec.rb
122
+ - spec/lib/webr/jasmine/reporter/html_spec.rb
123
+ - spec/spec_helper.rb
124
+ - jspec/jasmine_spec.js
159
125
  - tasks/spec.rake
160
- - lib/webr/jasmine/reporter/console.rb
161
- - js/jasmine-start.js
162
- - ext/jsdom/lib/jsdom/level2/html.js
163
- - ext/jsdom/lib/jsdom/browser/htmltodom.js
126
+ - ext/jsdom/lib/jsdom.js
164
127
  - ext/jsdom/lib/jsdom/browser/domtohtml.js
128
+ - ext/jsdom/lib/jsdom/browser/htmlencoding.js
129
+ - ext/jsdom/lib/jsdom/browser/htmltodom.js
130
+ - ext/jsdom/lib/jsdom/browser/index.js
131
+ - ext/jsdom/lib/jsdom/level1/core.js
132
+ - ext/jsdom/lib/jsdom/level2/core.js
133
+ - ext/jsdom/lib/jsdom/level2/events.js
134
+ - ext/jsdom/lib/jsdom/level2/html.js
135
+ - ext/jsdom/lib/jsdom/level2/index.js
136
+ - ext/jsdom/lib/jsdom/level2/languages/javascript.js
137
+ - ext/jsdom/lib/jsdom/level3/core.js
138
+ - ext/jsdom/lib/jsdom/level3/events.js
139
+ - ext/jsdom/lib/jsdom/level3/html.js
140
+ - ext/jsdom/lib/jsdom/level3/index.js
141
+ - ext/node-htmlparser/lib/node-htmlparser.js
165
142
  - ext/node-htmlparser/lib/node-htmlparser.min.js
166
- - lib/webr/jasmine/browser.rb
167
- - lib/webr/browser.rb
168
- - js/webr.js
143
+ - ext/request/request.js
144
+ has_rdoc: true
169
145
  homepage:
170
146
  licenses: []
171
147
 
@@ -179,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
179
155
  requirements:
180
156
  - - ">="
181
157
  - !ruby/object:Gem::Version
182
- hash: 3
158
+ hash: 2264822783645325826
183
159
  segments:
184
160
  - 0
185
161
  version: "0"
@@ -188,14 +164,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
164
  requirements:
189
165
  - - ">="
190
166
  - !ruby/object:Gem::Version
191
- hash: 3
167
+ hash: 2264822783645325826
192
168
  segments:
193
169
  - 0
194
170
  version: "0"
195
171
  requirements: []
196
172
 
197
173
  rubyforge_project:
198
- rubygems_version: 1.8.5
174
+ rubygems_version: 1.6.2
199
175
  signing_key:
200
176
  specification_version: 3
201
177
  summary: Pain-free javascript testing