qunit-rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +61 -0
- data/MIT-LICENSE +20 -0
- data/README.md +107 -0
- data/Rakefile +2 -0
- data/app/controllers/qunit/rails/application_controller.rb +6 -0
- data/app/controllers/qunit/rails/test_controller.rb +10 -0
- data/app/views/qunit/rails/test/index.html.erb +13 -0
- data/config/initializers/qunitizer.rb +1 -0
- data/config/routes.rb +7 -0
- data/lib/assets/javascripts/qunit.js +1669 -0
- data/lib/assets/stylesheets/qunit.css +235 -0
- data/lib/generators/qunit/install_generator.rb +16 -0
- data/lib/generators/templates/test_helper.css +4 -0
- data/lib/generators/templates/test_helper.js +2 -0
- data/lib/qunit/rails/engine.rb +7 -0
- data/lib/qunit/rails/version.rb +5 -0
- data/lib/qunit-rails.rb +6 -0
- data/qunit-rails.gemspec +17 -0
- metadata +81 -0
@@ -0,0 +1,235 @@
|
|
1
|
+
/**
|
2
|
+
* QUnit v1.5.0 - A JavaScript Unit Testing Framework
|
3
|
+
*
|
4
|
+
* http://docs.jquery.com/QUnit
|
5
|
+
*
|
6
|
+
* Copyright (c) 2012 John Resig, Jörn Zaefferer
|
7
|
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
8
|
+
* or GPL (GPL-LICENSE.txt) licenses.
|
9
|
+
*/
|
10
|
+
|
11
|
+
/** Font Family and Sizes */
|
12
|
+
|
13
|
+
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
14
|
+
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
15
|
+
}
|
16
|
+
|
17
|
+
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
18
|
+
#qunit-tests { font-size: smaller; }
|
19
|
+
|
20
|
+
|
21
|
+
/** Resets */
|
22
|
+
|
23
|
+
#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
|
24
|
+
margin: 0;
|
25
|
+
padding: 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
|
29
|
+
/** Header */
|
30
|
+
|
31
|
+
#qunit-header {
|
32
|
+
padding: 0.5em 0 0.5em 1em;
|
33
|
+
|
34
|
+
color: #8699a4;
|
35
|
+
background-color: #0d3349;
|
36
|
+
|
37
|
+
font-size: 1.5em;
|
38
|
+
line-height: 1em;
|
39
|
+
font-weight: normal;
|
40
|
+
|
41
|
+
border-radius: 15px 15px 0 0;
|
42
|
+
-moz-border-radius: 15px 15px 0 0;
|
43
|
+
-webkit-border-top-right-radius: 15px;
|
44
|
+
-webkit-border-top-left-radius: 15px;
|
45
|
+
}
|
46
|
+
|
47
|
+
#qunit-header a {
|
48
|
+
text-decoration: none;
|
49
|
+
color: #c2ccd1;
|
50
|
+
}
|
51
|
+
|
52
|
+
#qunit-header a:hover,
|
53
|
+
#qunit-header a:focus {
|
54
|
+
color: #fff;
|
55
|
+
}
|
56
|
+
|
57
|
+
#qunit-header label {
|
58
|
+
display: inline-block;
|
59
|
+
}
|
60
|
+
|
61
|
+
#qunit-banner {
|
62
|
+
height: 5px;
|
63
|
+
}
|
64
|
+
|
65
|
+
#qunit-testrunner-toolbar {
|
66
|
+
padding: 0.5em 0 0.5em 2em;
|
67
|
+
color: #5E740B;
|
68
|
+
background-color: #eee;
|
69
|
+
}
|
70
|
+
|
71
|
+
#qunit-userAgent {
|
72
|
+
padding: 0.5em 0 0.5em 2.5em;
|
73
|
+
background-color: #2b81af;
|
74
|
+
color: #fff;
|
75
|
+
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
76
|
+
}
|
77
|
+
|
78
|
+
|
79
|
+
/** Tests: Pass/Fail */
|
80
|
+
|
81
|
+
#qunit-tests {
|
82
|
+
list-style-position: inside;
|
83
|
+
}
|
84
|
+
|
85
|
+
#qunit-tests li {
|
86
|
+
padding: 0.4em 0.5em 0.4em 2.5em;
|
87
|
+
border-bottom: 1px solid #fff;
|
88
|
+
list-style-position: inside;
|
89
|
+
}
|
90
|
+
|
91
|
+
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
|
92
|
+
display: none;
|
93
|
+
}
|
94
|
+
|
95
|
+
#qunit-tests li strong {
|
96
|
+
cursor: pointer;
|
97
|
+
}
|
98
|
+
|
99
|
+
#qunit-tests li a {
|
100
|
+
padding: 0.5em;
|
101
|
+
color: #c2ccd1;
|
102
|
+
text-decoration: none;
|
103
|
+
}
|
104
|
+
#qunit-tests li a:hover,
|
105
|
+
#qunit-tests li a:focus {
|
106
|
+
color: #000;
|
107
|
+
}
|
108
|
+
|
109
|
+
#qunit-tests ol {
|
110
|
+
margin-top: 0.5em;
|
111
|
+
padding: 0.5em;
|
112
|
+
|
113
|
+
background-color: #fff;
|
114
|
+
|
115
|
+
border-radius: 15px;
|
116
|
+
-moz-border-radius: 15px;
|
117
|
+
-webkit-border-radius: 15px;
|
118
|
+
|
119
|
+
box-shadow: inset 0px 2px 13px #999;
|
120
|
+
-moz-box-shadow: inset 0px 2px 13px #999;
|
121
|
+
-webkit-box-shadow: inset 0px 2px 13px #999;
|
122
|
+
}
|
123
|
+
|
124
|
+
#qunit-tests table {
|
125
|
+
border-collapse: collapse;
|
126
|
+
margin-top: .2em;
|
127
|
+
}
|
128
|
+
|
129
|
+
#qunit-tests th {
|
130
|
+
text-align: right;
|
131
|
+
vertical-align: top;
|
132
|
+
padding: 0 .5em 0 0;
|
133
|
+
}
|
134
|
+
|
135
|
+
#qunit-tests td {
|
136
|
+
vertical-align: top;
|
137
|
+
}
|
138
|
+
|
139
|
+
#qunit-tests pre {
|
140
|
+
margin: 0;
|
141
|
+
white-space: pre-wrap;
|
142
|
+
word-wrap: break-word;
|
143
|
+
}
|
144
|
+
|
145
|
+
#qunit-tests del {
|
146
|
+
background-color: #e0f2be;
|
147
|
+
color: #374e0c;
|
148
|
+
text-decoration: none;
|
149
|
+
}
|
150
|
+
|
151
|
+
#qunit-tests ins {
|
152
|
+
background-color: #ffcaca;
|
153
|
+
color: #500;
|
154
|
+
text-decoration: none;
|
155
|
+
}
|
156
|
+
|
157
|
+
/*** Test Counts */
|
158
|
+
|
159
|
+
#qunit-tests b.counts { color: black; }
|
160
|
+
#qunit-tests b.passed { color: #5E740B; }
|
161
|
+
#qunit-tests b.failed { color: #710909; }
|
162
|
+
|
163
|
+
#qunit-tests li li {
|
164
|
+
margin: 0.5em;
|
165
|
+
padding: 0.4em 0.5em 0.4em 0.5em;
|
166
|
+
background-color: #fff;
|
167
|
+
border-bottom: none;
|
168
|
+
list-style-position: inside;
|
169
|
+
}
|
170
|
+
|
171
|
+
/*** Passing Styles */
|
172
|
+
|
173
|
+
#qunit-tests li li.pass {
|
174
|
+
color: #5E740B;
|
175
|
+
background-color: #fff;
|
176
|
+
border-left: 26px solid #C6E746;
|
177
|
+
}
|
178
|
+
|
179
|
+
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
180
|
+
#qunit-tests .pass .test-name { color: #366097; }
|
181
|
+
|
182
|
+
#qunit-tests .pass .test-actual,
|
183
|
+
#qunit-tests .pass .test-expected { color: #999999; }
|
184
|
+
|
185
|
+
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
186
|
+
|
187
|
+
/*** Failing Styles */
|
188
|
+
|
189
|
+
#qunit-tests li li.fail {
|
190
|
+
color: #710909;
|
191
|
+
background-color: #fff;
|
192
|
+
border-left: 26px solid #EE5757;
|
193
|
+
white-space: pre;
|
194
|
+
}
|
195
|
+
|
196
|
+
#qunit-tests > li:last-child {
|
197
|
+
border-radius: 0 0 15px 15px;
|
198
|
+
-moz-border-radius: 0 0 15px 15px;
|
199
|
+
-webkit-border-bottom-right-radius: 15px;
|
200
|
+
-webkit-border-bottom-left-radius: 15px;
|
201
|
+
}
|
202
|
+
|
203
|
+
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
|
204
|
+
#qunit-tests .fail .test-name,
|
205
|
+
#qunit-tests .fail .module-name { color: #000000; }
|
206
|
+
|
207
|
+
#qunit-tests .fail .test-actual { color: #EE5757; }
|
208
|
+
#qunit-tests .fail .test-expected { color: green; }
|
209
|
+
|
210
|
+
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
211
|
+
|
212
|
+
|
213
|
+
/** Result */
|
214
|
+
|
215
|
+
#qunit-testresult {
|
216
|
+
padding: 0.5em 0.5em 0.5em 2.5em;
|
217
|
+
|
218
|
+
color: #2b81af;
|
219
|
+
background-color: #D2E0E6;
|
220
|
+
|
221
|
+
border-bottom: 1px solid white;
|
222
|
+
}
|
223
|
+
#qunit-testresult .module-name {
|
224
|
+
font-weight: bold;
|
225
|
+
}
|
226
|
+
|
227
|
+
/** Fixture */
|
228
|
+
|
229
|
+
#qunit-fixture {
|
230
|
+
position: absolute;
|
231
|
+
top: -10000px;
|
232
|
+
left: -10000px;
|
233
|
+
width: 1000px;
|
234
|
+
height: 1000px;
|
235
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Qunit
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < ::Rails::Generators::Base
|
4
|
+
source_root File.expand_path('../../templates', __FILE__)
|
5
|
+
|
6
|
+
desc 'Setup Qunit into test'
|
7
|
+
|
8
|
+
def create_setup_files
|
9
|
+
empty_directory 'test/javascripts'
|
10
|
+
template 'test_helper.js', 'test/javascripts/test_helper.js'
|
11
|
+
empty_directory 'test/stylesheets'
|
12
|
+
template 'test_helper.css', 'test/stylesheets/test_helper.css'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/qunit-rails.rb
ADDED
data/qunit-rails.gemspec
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.expand_path('../lib/qunit/rails/version', __FILE__)
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = 'qunit-rails'
|
5
|
+
gem.version = Qunit::Rails::VERSION
|
6
|
+
|
7
|
+
gem.authors = ['Francesco Rodriguez']
|
8
|
+
gem.email = ['lrodriguezsanc@gmail.com']
|
9
|
+
gem.homepage = 'https://github.com/frodsan/qunit-rails'
|
10
|
+
gem.summary = 'Qunit for Rails 3.2+'
|
11
|
+
gem.description = 'Support for the Rails 3.2 asset pipeline'
|
12
|
+
|
13
|
+
gem.files = `git ls-files`.split($\)
|
14
|
+
gem.require_paths = ['lib']
|
15
|
+
|
16
|
+
gem.add_dependency 'railties', '~> 3.2.3'
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: qunit-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Francesco Rodriguez
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-25 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: railties
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.2.3
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.2.3
|
30
|
+
description: Support for the Rails 3.2 asset pipeline
|
31
|
+
email:
|
32
|
+
- lrodriguezsanc@gmail.com
|
33
|
+
executables: []
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- .gitignore
|
38
|
+
- Gemfile
|
39
|
+
- Gemfile.lock
|
40
|
+
- MIT-LICENSE
|
41
|
+
- README.md
|
42
|
+
- Rakefile
|
43
|
+
- app/controllers/qunit/rails/application_controller.rb
|
44
|
+
- app/controllers/qunit/rails/test_controller.rb
|
45
|
+
- app/views/qunit/rails/test/index.html.erb
|
46
|
+
- config/initializers/qunitizer.rb
|
47
|
+
- config/routes.rb
|
48
|
+
- lib/assets/javascripts/qunit.js
|
49
|
+
- lib/assets/stylesheets/qunit.css
|
50
|
+
- lib/generators/qunit/install_generator.rb
|
51
|
+
- lib/generators/templates/test_helper.css
|
52
|
+
- lib/generators/templates/test_helper.js
|
53
|
+
- lib/qunit-rails.rb
|
54
|
+
- lib/qunit/rails/engine.rb
|
55
|
+
- lib/qunit/rails/version.rb
|
56
|
+
- qunit-rails.gemspec
|
57
|
+
homepage: https://github.com/frodsan/qunit-rails
|
58
|
+
licenses: []
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ! '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 1.8.23
|
78
|
+
signing_key:
|
79
|
+
specification_version: 3
|
80
|
+
summary: Qunit for Rails 3.2+
|
81
|
+
test_files: []
|