js-test-driver-rails 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/Gemfile +2 -1
  2. data/README +40 -0
  3. data/Rakefile +1 -0
  4. data/VERSION +1 -1
  5. data/lib/js_test_driver.rb +5 -1
  6. data/lib/js_test_driver/config.rb +84 -7
  7. data/lib/js_test_driver/html_fixture.rb +40 -0
  8. data/lib/js_test_driver/runner.rb +21 -3
  9. data/test/fixtures/a.html +1 -0
  10. data/test/fixtures/b.html +1 -0
  11. data/test/fixtures/baz/a.html +1 -0
  12. data/test/fixtures/c.html +1 -0
  13. data/test/fixtures/foo/a.html +1 -0
  14. data/test/fixtures/foo/bar/a.html +1 -0
  15. data/test/fixtures/hello.txt +1 -0
  16. data/test/test_helper.rb +19 -0
  17. data/test/unit/config_test.rb +75 -2
  18. data/test/unit/html_fixture_test.rb +70 -0
  19. data/vendor/VERSIONS +3 -0
  20. data/vendor/jasmine-jstd-adapter/MIT.LICENSE +22 -0
  21. data/vendor/jasmine-jstd-adapter/README.md +25 -0
  22. data/vendor/jasmine-jstd-adapter/jsTestDriver.conf +6 -0
  23. data/vendor/jasmine-jstd-adapter/lib/jasmine/jasmine-0.11.1.js +2343 -0
  24. data/vendor/jasmine-jstd-adapter/lib/jstestdriver/JsTestDriver.jar +0 -0
  25. data/vendor/jasmine-jstd-adapter/server.sh +1 -0
  26. data/vendor/jasmine-jstd-adapter/src-test/tests.js +89 -0
  27. data/vendor/jasmine-jstd-adapter/src/JasmineAdapter.js +111 -0
  28. data/vendor/jasmine-jstd-adapter/test.sh +1 -0
  29. data/vendor/jasmine/Gemfile +6 -0
  30. data/vendor/jasmine/MIT.LICENSE +20 -0
  31. data/vendor/jasmine/README.markdown +28 -0
  32. data/vendor/jasmine/Rakefile +178 -0
  33. data/vendor/jasmine/cruise_config.rb +21 -0
  34. data/vendor/jasmine/example/SpecRunner.html +27 -0
  35. data/vendor/jasmine/example/spec/PlayerSpec.js +58 -0
  36. data/vendor/jasmine/example/spec/SpecHelper.js +9 -0
  37. data/vendor/jasmine/example/src/Player.js +22 -0
  38. data/vendor/jasmine/example/src/Song.js +7 -0
  39. data/vendor/jasmine/images/fail-16.png +0 -0
  40. data/vendor/jasmine/images/fail.png +0 -0
  41. data/vendor/jasmine/images/go-16.png +0 -0
  42. data/vendor/jasmine/images/go.png +0 -0
  43. data/vendor/jasmine/images/pending-16.png +0 -0
  44. data/vendor/jasmine/images/pending.png +0 -0
  45. data/vendor/jasmine/images/question-bk.png +0 -0
  46. data/vendor/jasmine/images/questionbk-16.png +0 -0
  47. data/vendor/jasmine/images/spinner.gif +0 -0
  48. data/vendor/jasmine/lib/jasmine-html.js +182 -0
  49. data/vendor/jasmine/lib/jasmine.css +166 -0
  50. data/vendor/jasmine/lib/jasmine.js +2421 -0
  51. data/vendor/jasmine/lib/json2.js +478 -0
  52. data/vendor/jasmine/spec/runner.html +80 -0
  53. data/vendor/jasmine/spec/suites/BaseSpec.js +27 -0
  54. data/vendor/jasmine/spec/suites/CustomMatchersSpec.js +97 -0
  55. data/vendor/jasmine/spec/suites/EnvSpec.js +158 -0
  56. data/vendor/jasmine/spec/suites/ExceptionsSpec.js +107 -0
  57. data/vendor/jasmine/spec/suites/JsApiReporterSpec.js +103 -0
  58. data/vendor/jasmine/spec/suites/MatchersSpec.js +795 -0
  59. data/vendor/jasmine/spec/suites/MockClockSpec.js +38 -0
  60. data/vendor/jasmine/spec/suites/MultiReporterSpec.js +45 -0
  61. data/vendor/jasmine/spec/suites/NestedResultsSpec.js +54 -0
  62. data/vendor/jasmine/spec/suites/PrettyPrintSpec.js +93 -0
  63. data/vendor/jasmine/spec/suites/QueueSpec.js +23 -0
  64. data/vendor/jasmine/spec/suites/ReporterSpec.js +56 -0
  65. data/vendor/jasmine/spec/suites/RunnerSpec.js +267 -0
  66. data/vendor/jasmine/spec/suites/SpecRunningSpec.js +1253 -0
  67. data/vendor/jasmine/spec/suites/SpecSpec.js +124 -0
  68. data/vendor/jasmine/spec/suites/SpySpec.js +201 -0
  69. data/vendor/jasmine/spec/suites/SuiteSpec.js +120 -0
  70. data/vendor/jasmine/spec/suites/TrivialReporterSpec.js +235 -0
  71. data/vendor/jasmine/spec/suites/UtilSpec.js +40 -0
  72. data/vendor/jasmine/spec/suites/WaitsForBlockSpec.js +87 -0
  73. data/vendor/jasmine/src/Block.js +22 -0
  74. data/vendor/jasmine/src/Env.js +264 -0
  75. data/vendor/jasmine/src/JsApiReporter.js +102 -0
  76. data/vendor/jasmine/src/Matchers.js +354 -0
  77. data/vendor/jasmine/src/MultiReporter.js +35 -0
  78. data/vendor/jasmine/src/NestedResults.js +80 -0
  79. data/vendor/jasmine/src/PrettyPrinter.js +122 -0
  80. data/vendor/jasmine/src/Queue.js +99 -0
  81. data/vendor/jasmine/src/Reporter.js +31 -0
  82. data/vendor/jasmine/src/Runner.js +77 -0
  83. data/vendor/jasmine/src/Spec.js +242 -0
  84. data/vendor/jasmine/src/Suite.js +82 -0
  85. data/vendor/jasmine/src/WaitsBlock.js +13 -0
  86. data/vendor/jasmine/src/WaitsForBlock.js +52 -0
  87. data/vendor/jasmine/src/base.js +589 -0
  88. data/vendor/jasmine/src/html/TrivialReporter.js +182 -0
  89. data/vendor/jasmine/src/html/jasmine.css +166 -0
  90. data/vendor/jasmine/src/mock-timeout.js +183 -0
  91. data/vendor/jasmine/src/util.js +67 -0
  92. data/vendor/jasmine/src/version.json +5 -0
  93. metadata +102 -5
  94. data/test/unit/jsTestDriver.conf +0 -2
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @namespace
3
+ */
4
+ jasmine.util = {};
5
+
6
+ /**
7
+ * Declare that a child class inherit it's prototype from the parent class.
8
+ *
9
+ * @private
10
+ * @param {Function} childClass
11
+ * @param {Function} parentClass
12
+ */
13
+ jasmine.util.inherit = function(childClass, parentClass) {
14
+ /**
15
+ * @private
16
+ */
17
+ var subclass = function() {
18
+ };
19
+ subclass.prototype = parentClass.prototype;
20
+ childClass.prototype = new subclass;
21
+ };
22
+
23
+ jasmine.util.formatException = function(e) {
24
+ var lineNumber;
25
+ if (e.line) {
26
+ lineNumber = e.line;
27
+ }
28
+ else if (e.lineNumber) {
29
+ lineNumber = e.lineNumber;
30
+ }
31
+
32
+ var file;
33
+
34
+ if (e.sourceURL) {
35
+ file = e.sourceURL;
36
+ }
37
+ else if (e.fileName) {
38
+ file = e.fileName;
39
+ }
40
+
41
+ var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
42
+
43
+ if (file && lineNumber) {
44
+ message += ' in ' + file + ' (line ' + lineNumber + ')';
45
+ }
46
+
47
+ return message;
48
+ };
49
+
50
+ jasmine.util.htmlEscape = function(str) {
51
+ if (!str) return str;
52
+ return str.replace(/&/g, '&')
53
+ .replace(/</g, '&lt;')
54
+ .replace(/>/g, '&gt;');
55
+ };
56
+
57
+ jasmine.util.argsToArray = function(args) {
58
+ var arrayOfArgs = [];
59
+ for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
60
+ return arrayOfArgs;
61
+ };
62
+
63
+ jasmine.util.extend = function(destination, source) {
64
+ for (var property in source) destination[property] = source[property];
65
+ return destination;
66
+ };
67
+
@@ -0,0 +1,5 @@
1
+ {
2
+ "major": 1,
3
+ "minor": 0,
4
+ "build": "0.rc1"
5
+ }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js-test-driver-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam Pohorecki
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-01 00:00:00 +02:00
18
+ date: 2010-09-02 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -74,6 +74,20 @@ dependencies:
74
74
  version: "0"
75
75
  requirement: *id004
76
76
  type: :runtime
77
+ - !ruby/object:Gem::Dependency
78
+ prerelease: false
79
+ name: json
80
+ version_requirements: &id005 !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ hash: 3
86
+ segments:
87
+ - 0
88
+ version: "0"
89
+ requirement: *id005
90
+ type: :runtime
77
91
  description: Use ruby to configure JsTestDriver, capture browsers and run tests.
78
92
  email: adam@pohorecki.pl
79
93
  executables: []
@@ -91,12 +105,94 @@ files:
91
105
  - VERSION
92
106
  - lib/js_test_driver.rb
93
107
  - lib/js_test_driver/config.rb
108
+ - lib/js_test_driver/html_fixture.rb
94
109
  - lib/js_test_driver/runner.rb
95
110
  - lib/js_test_driver/tasks.rb
111
+ - test/fixtures/a.html
112
+ - test/fixtures/b.html
113
+ - test/fixtures/baz/a.html
114
+ - test/fixtures/c.html
115
+ - test/fixtures/foo/a.html
116
+ - test/fixtures/foo/bar/a.html
117
+ - test/fixtures/hello.txt
96
118
  - test/test_helper.rb
97
119
  - test/unit/config_test.rb
98
- - test/unit/jsTestDriver.conf
120
+ - test/unit/html_fixture_test.rb
99
121
  - test/unit/runner_test.rb
122
+ - vendor/VERSIONS
123
+ - vendor/jasmine-jstd-adapter/MIT.LICENSE
124
+ - vendor/jasmine-jstd-adapter/README.md
125
+ - vendor/jasmine-jstd-adapter/jsTestDriver.conf
126
+ - vendor/jasmine-jstd-adapter/lib/jasmine/jasmine-0.11.1.js
127
+ - vendor/jasmine-jstd-adapter/lib/jstestdriver/JsTestDriver.jar
128
+ - vendor/jasmine-jstd-adapter/server.sh
129
+ - vendor/jasmine-jstd-adapter/src-test/tests.js
130
+ - vendor/jasmine-jstd-adapter/src/JasmineAdapter.js
131
+ - vendor/jasmine-jstd-adapter/test.sh
132
+ - vendor/jasmine/Gemfile
133
+ - vendor/jasmine/MIT.LICENSE
134
+ - vendor/jasmine/README.markdown
135
+ - vendor/jasmine/Rakefile
136
+ - vendor/jasmine/cruise_config.rb
137
+ - vendor/jasmine/example/SpecRunner.html
138
+ - vendor/jasmine/example/spec/PlayerSpec.js
139
+ - vendor/jasmine/example/spec/SpecHelper.js
140
+ - vendor/jasmine/example/src/Player.js
141
+ - vendor/jasmine/example/src/Song.js
142
+ - vendor/jasmine/images/fail-16.png
143
+ - vendor/jasmine/images/fail.png
144
+ - vendor/jasmine/images/go-16.png
145
+ - vendor/jasmine/images/go.png
146
+ - vendor/jasmine/images/pending-16.png
147
+ - vendor/jasmine/images/pending.png
148
+ - vendor/jasmine/images/question-bk.png
149
+ - vendor/jasmine/images/questionbk-16.png
150
+ - vendor/jasmine/images/spinner.gif
151
+ - vendor/jasmine/lib/jasmine-html.js
152
+ - vendor/jasmine/lib/jasmine.css
153
+ - vendor/jasmine/lib/jasmine.js
154
+ - vendor/jasmine/lib/json2.js
155
+ - vendor/jasmine/spec/runner.html
156
+ - vendor/jasmine/spec/suites/BaseSpec.js
157
+ - vendor/jasmine/spec/suites/CustomMatchersSpec.js
158
+ - vendor/jasmine/spec/suites/EnvSpec.js
159
+ - vendor/jasmine/spec/suites/ExceptionsSpec.js
160
+ - vendor/jasmine/spec/suites/JsApiReporterSpec.js
161
+ - vendor/jasmine/spec/suites/MatchersSpec.js
162
+ - vendor/jasmine/spec/suites/MockClockSpec.js
163
+ - vendor/jasmine/spec/suites/MultiReporterSpec.js
164
+ - vendor/jasmine/spec/suites/NestedResultsSpec.js
165
+ - vendor/jasmine/spec/suites/PrettyPrintSpec.js
166
+ - vendor/jasmine/spec/suites/QueueSpec.js
167
+ - vendor/jasmine/spec/suites/ReporterSpec.js
168
+ - vendor/jasmine/spec/suites/RunnerSpec.js
169
+ - vendor/jasmine/spec/suites/SpecRunningSpec.js
170
+ - vendor/jasmine/spec/suites/SpecSpec.js
171
+ - vendor/jasmine/spec/suites/SpySpec.js
172
+ - vendor/jasmine/spec/suites/SuiteSpec.js
173
+ - vendor/jasmine/spec/suites/TrivialReporterSpec.js
174
+ - vendor/jasmine/spec/suites/UtilSpec.js
175
+ - vendor/jasmine/spec/suites/WaitsForBlockSpec.js
176
+ - vendor/jasmine/src/Block.js
177
+ - vendor/jasmine/src/Env.js
178
+ - vendor/jasmine/src/JsApiReporter.js
179
+ - vendor/jasmine/src/Matchers.js
180
+ - vendor/jasmine/src/MultiReporter.js
181
+ - vendor/jasmine/src/NestedResults.js
182
+ - vendor/jasmine/src/PrettyPrinter.js
183
+ - vendor/jasmine/src/Queue.js
184
+ - vendor/jasmine/src/Reporter.js
185
+ - vendor/jasmine/src/Runner.js
186
+ - vendor/jasmine/src/Spec.js
187
+ - vendor/jasmine/src/Suite.js
188
+ - vendor/jasmine/src/WaitsBlock.js
189
+ - vendor/jasmine/src/WaitsForBlock.js
190
+ - vendor/jasmine/src/base.js
191
+ - vendor/jasmine/src/html/TrivialReporter.js
192
+ - vendor/jasmine/src/html/jasmine.css
193
+ - vendor/jasmine/src/mock-timeout.js
194
+ - vendor/jasmine/src/util.js
195
+ - vendor/jasmine/src/version.json
100
196
  - vendor/js_test_driver.jar
101
197
  has_rdoc: true
102
198
  homepage: http://github.com/psyho/js-test-driver-rails
@@ -134,5 +230,6 @@ specification_version: 3
134
230
  summary: A wrapper for JsTestDriver for use with ruby/rails projects
135
231
  test_files:
136
232
  - test/unit/runner_test.rb
233
+ - test/unit/html_fixture_test.rb
137
234
  - test/unit/config_test.rb
138
235
  - test/test_helper.rb
@@ -1,2 +0,0 @@
1
- ---
2
- server: http://localhost:4224