matcha 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +19 -0
  2. data/Gemfile +7 -0
  3. data/LICENSE +90 -0
  4. data/README.md +194 -0
  5. data/Rakefile +8 -0
  6. data/app/controllers/matcha/specs_controller.rb +22 -0
  7. data/app/models/matcha/spec.rb +25 -0
  8. data/app/views/layouts/matcha/specs.html.erb +31 -0
  9. data/app/views/matcha/specs/index.html.erb +1 -0
  10. data/app/views/matcha/specs/show.html.erb +1 -0
  11. data/config/routes.rb +4 -0
  12. data/lib/matcha.rb +41 -0
  13. data/lib/matcha/engine.rb +31 -0
  14. data/lib/matcha/runner.rb +151 -0
  15. data/lib/matcha/server.rb +7 -0
  16. data/lib/tasks/matcha.rake +11 -0
  17. data/matcha.gemspec +30 -0
  18. data/spec/controllers/specs_controller_spec.rb +46 -0
  19. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  20. data/spec/dummy/app/assets/javascripts/array_sum.js.coffee +4 -0
  21. data/spec/dummy/config.ru +4 -0
  22. data/spec/dummy/config/application.rb +17 -0
  23. data/spec/dummy/config/boot.rb +6 -0
  24. data/spec/dummy/config/environment.rb +5 -0
  25. data/spec/dummy/config/environments/test.rb +29 -0
  26. data/spec/dummy/config/initializers/matcha.rb +3 -0
  27. data/spec/dummy/spec/javascripts/array_sum_cs_spec.js.coffee +8 -0
  28. data/spec/dummy/spec/javascripts/array_sum_js_spec.js +11 -0
  29. data/spec/dummy/spec/javascripts/assert_spec.js.coffee +9 -0
  30. data/spec/dummy/spec/javascripts/failing_spec.js +5 -0
  31. data/spec/dummy/spec/javascripts/spec_helper.js +3 -0
  32. data/spec/dummy/spec/javascripts/spec_helper_spec.js +7 -0
  33. data/spec/dummy/spec/javascripts/subdirectory/subdirectory_spec.js +5 -0
  34. data/spec/dummy/spec/javascripts/templates/hello.jst.ejs +1 -0
  35. data/spec/dummy/spec/javascripts/templating_spec.js +8 -0
  36. data/spec/dummy/spec/javascripts/transactions_spec.js.coffee +7 -0
  37. data/spec/matcha_spec.rb +40 -0
  38. data/spec/models/spec_spec.rb +45 -0
  39. data/spec/runner_spec.rb +36 -0
  40. data/spec/server_spec.rb +41 -0
  41. data/spec/spec_helper.rb +18 -0
  42. data/spec/views/specs/index.html.erb_spec.rb +12 -0
  43. data/spec/views/specs/show.html.erb_spec.rb +10 -0
  44. data/spec/views/specs/specs.html.erb_spec.rb +15 -0
  45. data/vendor/assets/javascripts/chai.js +2007 -0
  46. data/vendor/assets/javascripts/matcha/runner.js +70 -0
  47. data/vendor/assets/javascripts/matcha/server.js +0 -0
  48. data/vendor/assets/javascripts/mocha.js +3290 -0
  49. data/vendor/assets/stylesheets/mocha.css +133 -0
  50. metadata +202 -0
@@ -0,0 +1,133 @@
1
+
2
+ body {
3
+ font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
4
+ padding: 60px 50px;
5
+ }
6
+
7
+ #mocha h1, h2 {
8
+ margin: 0;
9
+ }
10
+
11
+ #mocha h1 {
12
+ font-size: 1em;
13
+ font-weight: 200;
14
+ }
15
+
16
+ #mocha .suite .suite h1 {
17
+ font-size: .8em;
18
+ }
19
+
20
+ #mocha h2 {
21
+ font-size: 12px;
22
+ font-weight: normal;
23
+ cursor: pointer;
24
+ }
25
+
26
+ #mocha .suite {
27
+ margin-left: 15px;
28
+ }
29
+
30
+ #mocha .test {
31
+ margin-left: 15px;
32
+ }
33
+
34
+ #mocha .test:hover h2::after {
35
+ position: relative;
36
+ top: 0;
37
+ right: -10px;
38
+ content: '(view source)';
39
+ font-size: 12px;
40
+ color: #888;
41
+ }
42
+
43
+ #mocha .test.pending:hover h2::after {
44
+ content: '(pending)';
45
+ }
46
+
47
+ #mocha .test.pass::before {
48
+ content: '✓';
49
+ font-size: 12px;
50
+ display: block;
51
+ float: left;
52
+ margin-right: 5px;
53
+ color: #00c41c;
54
+ }
55
+
56
+ #mocha .test.pending {
57
+ color: #0b97c4;
58
+ }
59
+
60
+ #mocha .test.pending::before {
61
+ content: '◦';
62
+ color: #0b97c4;
63
+ }
64
+
65
+ #mocha .test.fail {
66
+ color: #c00;
67
+ }
68
+
69
+ #mocha .test.fail pre {
70
+ color: black;
71
+ }
72
+
73
+ #mocha .test.fail::before {
74
+ content: '✖';
75
+ font-size: 12px;
76
+ display: block;
77
+ float: left;
78
+ margin-right: 5px;
79
+ color: #c00;
80
+ }
81
+
82
+ #mocha .test pre.error {
83
+ color: #c00;
84
+ }
85
+
86
+ #mocha .test pre {
87
+ display: inline-block;
88
+ font: 12px/1.5 monaco, monospace;
89
+ margin: 5px;
90
+ padding: 15px;
91
+ border: 1px solid #eee;
92
+ border-bottom-color: #ddd;
93
+ -webkit-border-radius: 3px;
94
+ -webkit-box-shadow: 0 1px 3px #eee;
95
+ }
96
+
97
+ #error {
98
+ color: #c00;
99
+ font-size: 1.5 em;
100
+ font-weight: 100;
101
+ letter-spacing: 1px;
102
+ }
103
+
104
+ #stats {
105
+ position: fixed;
106
+ top: 15px;
107
+ right: 10px;
108
+ font-size: 12px;
109
+ margin: 0;
110
+ color: #888;
111
+ }
112
+
113
+ #stats .progress {
114
+ float: right;
115
+ padding-top: 0;
116
+ }
117
+
118
+ #stats em {
119
+ color: black;
120
+ }
121
+
122
+ #stats li {
123
+ display: inline-block;
124
+ margin: 0 5px;
125
+ list-style: none;
126
+ padding-top: 11px;
127
+ }
128
+
129
+ code .comment { color: #ddd }
130
+ code .init { color: #2F6FAD }
131
+ code .string { color: #5890AD }
132
+ code .keyword { color: #8A6343 }
133
+ code .number { color: #2F6FAD }
metadata ADDED
@@ -0,0 +1,202 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: matcha
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - John Firebaugh
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: jquery-rails
16
+ requirement: &70347630581060 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70347630581060
25
+ - !ruby/object:Gem::Dependency
26
+ name: rails
27
+ requirement: &70347630579520 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '3.1'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70347630579520
36
+ - !ruby/object:Gem::Dependency
37
+ name: capybara
38
+ requirement: &70347630578280 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70347630578280
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec-rails
49
+ requirement: &70347630577700 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70347630577700
58
+ - !ruby/object:Gem::Dependency
59
+ name: capybara-firebug
60
+ requirement: &70347630576380 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: '1.1'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70347630576380
69
+ - !ruby/object:Gem::Dependency
70
+ name: coffee-script
71
+ requirement: &70347630574600 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70347630574600
80
+ - !ruby/object:Gem::Dependency
81
+ name: ejs
82
+ requirement: &70347630573540 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *70347630573540
91
+ description: Unit test your Rails JavaScript with the mocha test framework and chai
92
+ assertion library
93
+ email:
94
+ - john.firebaugh@gmail.com
95
+ executables: []
96
+ extensions: []
97
+ extra_rdoc_files: []
98
+ files:
99
+ - .gitignore
100
+ - Gemfile
101
+ - LICENSE
102
+ - README.md
103
+ - Rakefile
104
+ - app/controllers/matcha/specs_controller.rb
105
+ - app/models/matcha/spec.rb
106
+ - app/views/layouts/matcha/specs.html.erb
107
+ - app/views/matcha/specs/index.html.erb
108
+ - app/views/matcha/specs/show.html.erb
109
+ - config/routes.rb
110
+ - lib/matcha.rb
111
+ - lib/matcha/engine.rb
112
+ - lib/matcha/runner.rb
113
+ - lib/matcha/server.rb
114
+ - lib/tasks/matcha.rake
115
+ - matcha.gemspec
116
+ - spec/controllers/specs_controller_spec.rb
117
+ - spec/dummy/app/assets/javascripts/application.js
118
+ - spec/dummy/app/assets/javascripts/array_sum.js.coffee
119
+ - spec/dummy/config.ru
120
+ - spec/dummy/config/application.rb
121
+ - spec/dummy/config/boot.rb
122
+ - spec/dummy/config/environment.rb
123
+ - spec/dummy/config/environments/test.rb
124
+ - spec/dummy/config/initializers/matcha.rb
125
+ - spec/dummy/spec/javascripts/array_sum_cs_spec.js.coffee
126
+ - spec/dummy/spec/javascripts/array_sum_js_spec.js
127
+ - spec/dummy/spec/javascripts/assert_spec.js.coffee
128
+ - spec/dummy/spec/javascripts/failing_spec.js
129
+ - spec/dummy/spec/javascripts/spec_helper.js
130
+ - spec/dummy/spec/javascripts/spec_helper_spec.js
131
+ - spec/dummy/spec/javascripts/subdirectory/subdirectory_spec.js
132
+ - spec/dummy/spec/javascripts/templates/hello.jst.ejs
133
+ - spec/dummy/spec/javascripts/templating_spec.js
134
+ - spec/dummy/spec/javascripts/transactions_spec.js.coffee
135
+ - spec/matcha_spec.rb
136
+ - spec/models/spec_spec.rb
137
+ - spec/runner_spec.rb
138
+ - spec/server_spec.rb
139
+ - spec/spec_helper.rb
140
+ - spec/views/specs/index.html.erb_spec.rb
141
+ - spec/views/specs/show.html.erb_spec.rb
142
+ - spec/views/specs/specs.html.erb_spec.rb
143
+ - vendor/assets/javascripts/chai.js
144
+ - vendor/assets/javascripts/matcha/runner.js
145
+ - vendor/assets/javascripts/matcha/server.js
146
+ - vendor/assets/javascripts/mocha.js
147
+ - vendor/assets/stylesheets/mocha.css
148
+ homepage: http://github.com/jfirebaugh/matcha
149
+ licenses: []
150
+ post_install_message:
151
+ rdoc_options: []
152
+ require_paths:
153
+ - lib
154
+ required_ruby_version: !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ required_rubygems_version: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ requirements: []
167
+ rubyforge_project:
168
+ rubygems_version: 1.8.15
169
+ signing_key:
170
+ specification_version: 3
171
+ summary: Matcha is a Rails engine that allows you to test your JavaScript with the
172
+ mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen,
173
+ but does not attempt to be framework agnostic. By sticking with Rails, Matcha can
174
+ take full advantage of features such as the asset pipeline and engines.
175
+ test_files:
176
+ - spec/controllers/specs_controller_spec.rb
177
+ - spec/dummy/app/assets/javascripts/application.js
178
+ - spec/dummy/app/assets/javascripts/array_sum.js.coffee
179
+ - spec/dummy/config.ru
180
+ - spec/dummy/config/application.rb
181
+ - spec/dummy/config/boot.rb
182
+ - spec/dummy/config/environment.rb
183
+ - spec/dummy/config/environments/test.rb
184
+ - spec/dummy/config/initializers/matcha.rb
185
+ - spec/dummy/spec/javascripts/array_sum_cs_spec.js.coffee
186
+ - spec/dummy/spec/javascripts/array_sum_js_spec.js
187
+ - spec/dummy/spec/javascripts/assert_spec.js.coffee
188
+ - spec/dummy/spec/javascripts/failing_spec.js
189
+ - spec/dummy/spec/javascripts/spec_helper.js
190
+ - spec/dummy/spec/javascripts/spec_helper_spec.js
191
+ - spec/dummy/spec/javascripts/subdirectory/subdirectory_spec.js
192
+ - spec/dummy/spec/javascripts/templates/hello.jst.ejs
193
+ - spec/dummy/spec/javascripts/templating_spec.js
194
+ - spec/dummy/spec/javascripts/transactions_spec.js.coffee
195
+ - spec/matcha_spec.rb
196
+ - spec/models/spec_spec.rb
197
+ - spec/runner_spec.rb
198
+ - spec/server_spec.rb
199
+ - spec/spec_helper.rb
200
+ - spec/views/specs/index.html.erb_spec.rb
201
+ - spec/views/specs/show.html.erb_spec.rb
202
+ - spec/views/specs/specs.html.erb_spec.rb