thincloud-test-rails 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/.gitignore +17 -0
  2. data/.ruby-version +1 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +87 -0
  6. data/Rakefile +26 -0
  7. data/lib/generators/thincloud/templates/minitest_helper.rb +21 -0
  8. data/lib/generators/thincloud/templates/support/capybara.rb +10 -0
  9. data/lib/generators/thincloud/templates/support/database_cleaner.rb +12 -0
  10. data/lib/generators/thincloud/templates/support/factory_girl.rb +4 -0
  11. data/lib/generators/thincloud/templates/support/minitest_rails.rb +8 -0
  12. data/lib/generators/thincloud/templates/support/routing_spec.rb +12 -0
  13. data/lib/generators/thincloud/test_generator.rb +54 -0
  14. data/lib/thincloud-test-rails.rb +17 -0
  15. data/lib/thincloud/test/rails.rb +2 -0
  16. data/lib/thincloud/test/rails/railtie.rb +17 -0
  17. data/lib/thincloud/test/rails/version.rb +7 -0
  18. data/test/dummy/.gitignore +1 -0
  19. data/test/dummy/Guardfile +17 -0
  20. data/test/dummy/README.rdoc +261 -0
  21. data/test/dummy/Rakefile +7 -0
  22. data/test/dummy/app/assets/javascripts/application.js +15 -0
  23. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  24. data/test/dummy/app/controllers/application_controller.rb +3 -0
  25. data/test/dummy/app/helpers/application_helper.rb +2 -0
  26. data/test/dummy/app/mailers/.gitkeep +0 -0
  27. data/test/dummy/app/models/.gitkeep +0 -0
  28. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  29. data/test/dummy/config.ru +4 -0
  30. data/test/dummy/config/application.rb +59 -0
  31. data/test/dummy/config/boot.rb +10 -0
  32. data/test/dummy/config/database.yml +25 -0
  33. data/test/dummy/config/environment.rb +5 -0
  34. data/test/dummy/config/environments/development.rb +37 -0
  35. data/test/dummy/config/environments/production.rb +67 -0
  36. data/test/dummy/config/environments/test.rb +37 -0
  37. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  38. data/test/dummy/config/initializers/inflections.rb +15 -0
  39. data/test/dummy/config/initializers/mime_types.rb +5 -0
  40. data/test/dummy/config/initializers/secret_token.rb +7 -0
  41. data/test/dummy/config/initializers/session_store.rb +8 -0
  42. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  43. data/test/dummy/config/locales/en.yml +5 -0
  44. data/test/dummy/config/routes.rb +58 -0
  45. data/test/dummy/lib/assets/.gitkeep +0 -0
  46. data/test/dummy/lib/tasks/test.rake +10 -0
  47. data/test/dummy/log/.gitkeep +0 -0
  48. data/test/dummy/public/404.html +26 -0
  49. data/test/dummy/public/422.html +26 -0
  50. data/test/dummy/public/500.html +25 -0
  51. data/test/dummy/public/favicon.ico +0 -0
  52. data/test/dummy/script/rails +6 -0
  53. data/test/dummy/test/factories/.gitkeep +0 -0
  54. data/test/dummy/test/minitest_helper.rb +36 -0
  55. data/thincloud-test-rails.gemspec +29 -0
  56. metadata +287 -0
File without changes
@@ -0,0 +1,10 @@
1
+ require "rake/testtask"
2
+
3
+ task default: :test
4
+
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.libs << "lib"
7
+ t.libs << "test"
8
+ t.pattern = "test/**/*_test.rb"
9
+ t.verbose = false
10
+ end
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
File without changes
@@ -0,0 +1,36 @@
1
+ if RUBY_ENGINE == "ruby"
2
+ begin
3
+ require "simplecov"
4
+ SimpleCov.add_filter "test"
5
+ SimpleCov.add_filter "config"
6
+ SimpleCov.command_name "MiniTest"
7
+ SimpleCov.start
8
+ rescue LoadError
9
+ warn "unable to load SimpleCov"
10
+ end
11
+ end
12
+
13
+ ENV["RAILS_ENV"] = "test"
14
+ require File.expand_path('../../config/environment', __FILE__)
15
+
16
+ require "minitest/autorun"
17
+ require "minitest/rails"
18
+ require "minitest/pride" # Provides awesome colorful output
19
+
20
+ # Uncomment if you want Capybara in accceptance/integration tests
21
+ # require "minitest/rails/capybara"
22
+
23
+ require "mocha/setup"
24
+
25
+ # Requires supporting ruby files with custom matchers and macros, etc,
26
+ # in spec/support/ and its subdirectories.
27
+ Dir[File.join("./test/support/**/*.rb")].sort.each { |f| require f }
28
+
29
+ class MiniTest::Rails::ActiveSupport::TestCase
30
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
31
+ # fixtures :all
32
+
33
+ # Add more helper methods to be used by all tests here...
34
+ end
35
+
36
+ MiniTest::Rails.override_testunit!
@@ -0,0 +1,29 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path("../lib/thincloud/test/rails/version", __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = "thincloud-test-rails"
6
+ gem.version = Thincloud::Test::Rails::VERSION
7
+ gem.authors = ["Phil Cohen", "Don Morrison"]
8
+ gem.email = ["pcohen@newleaders.com", "dmorrison@newleaders.com"]
9
+ gem.description = "Opinionated testing framework dependencies and " <<
10
+ "configuration for Rails applications."
11
+ gem.summary = "Opinionated testing framework dependencies and " <<
12
+ "configuration for Rails applications."
13
+ gem.homepage = "http://newleaders.github.com/thincloud-test-rails"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency "rails", "~> 3.2.11"
21
+ gem.add_dependency "capybara", "~> 2.0.2"
22
+ gem.add_dependency "database_cleaner", "~> 0.9.1"
23
+ gem.add_dependency "factory_girl_rails", "~> 4.1.0"
24
+ gem.add_dependency "minitest-rails", "~> 0.5.0"
25
+ gem.add_dependency "minitest-rails-shoulda", "~> 0.4.0"
26
+ gem.add_dependency "minitest-rails-capybara", "~> 0.5.1"
27
+ gem.add_dependency "shoulda-matchers", "1.4.1" # 1.4.2 requires mocha 0.10
28
+ gem.add_dependency "thincloud-test", "~> 1.0.0.pre"
29
+ end
metadata ADDED
@@ -0,0 +1,287 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: thincloud-test-rails
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: 6
5
+ version: 1.0.0.pre
6
+ platform: ruby
7
+ authors:
8
+ - Phil Cohen
9
+ - Don Morrison
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-01-27 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: 3.2.11
21
+ none: false
22
+ prerelease: false
23
+ name: rails
24
+ requirement: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ version: 3.2.11
29
+ none: false
30
+ type: :runtime
31
+ - !ruby/object:Gem::Dependency
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ~>
35
+ - !ruby/object:Gem::Version
36
+ version: 2.0.2
37
+ none: false
38
+ prerelease: false
39
+ name: capybara
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: 2.0.2
45
+ none: false
46
+ type: :runtime
47
+ - !ruby/object:Gem::Dependency
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ~>
51
+ - !ruby/object:Gem::Version
52
+ version: 0.9.1
53
+ none: false
54
+ prerelease: false
55
+ name: database_cleaner
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ version: 0.9.1
61
+ none: false
62
+ type: :runtime
63
+ - !ruby/object:Gem::Dependency
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 4.1.0
69
+ none: false
70
+ prerelease: false
71
+ name: factory_girl_rails
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: 4.1.0
77
+ none: false
78
+ type: :runtime
79
+ - !ruby/object:Gem::Dependency
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ~>
83
+ - !ruby/object:Gem::Version
84
+ version: 0.5.0
85
+ none: false
86
+ prerelease: false
87
+ name: minitest-rails
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ~>
91
+ - !ruby/object:Gem::Version
92
+ version: 0.5.0
93
+ none: false
94
+ type: :runtime
95
+ - !ruby/object:Gem::Dependency
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ~>
99
+ - !ruby/object:Gem::Version
100
+ version: 0.4.0
101
+ none: false
102
+ prerelease: false
103
+ name: minitest-rails-shoulda
104
+ requirement: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ~>
107
+ - !ruby/object:Gem::Version
108
+ version: 0.4.0
109
+ none: false
110
+ type: :runtime
111
+ - !ruby/object:Gem::Dependency
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ~>
115
+ - !ruby/object:Gem::Version
116
+ version: 0.5.1
117
+ none: false
118
+ prerelease: false
119
+ name: minitest-rails-capybara
120
+ requirement: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: 0.5.1
125
+ none: false
126
+ type: :runtime
127
+ - !ruby/object:Gem::Dependency
128
+ version_requirements: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - '='
131
+ - !ruby/object:Gem::Version
132
+ version: 1.4.1
133
+ none: false
134
+ prerelease: false
135
+ name: shoulda-matchers
136
+ requirement: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - '='
139
+ - !ruby/object:Gem::Version
140
+ version: 1.4.1
141
+ none: false
142
+ type: :runtime
143
+ - !ruby/object:Gem::Dependency
144
+ version_requirements: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ~>
147
+ - !ruby/object:Gem::Version
148
+ version: 1.0.0.pre
149
+ none: false
150
+ prerelease: false
151
+ name: thincloud-test
152
+ requirement: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ~>
155
+ - !ruby/object:Gem::Version
156
+ version: 1.0.0.pre
157
+ none: false
158
+ type: :runtime
159
+ description: Opinionated testing framework dependencies and configuration for Rails
160
+ applications.
161
+ email:
162
+ - pcohen@newleaders.com
163
+ - dmorrison@newleaders.com
164
+ executables: []
165
+ extensions: []
166
+ extra_rdoc_files: []
167
+ files:
168
+ - .gitignore
169
+ - .ruby-version
170
+ - Gemfile
171
+ - LICENSE.txt
172
+ - README.md
173
+ - Rakefile
174
+ - lib/generators/thincloud/templates/minitest_helper.rb
175
+ - lib/generators/thincloud/templates/support/capybara.rb
176
+ - lib/generators/thincloud/templates/support/database_cleaner.rb
177
+ - lib/generators/thincloud/templates/support/factory_girl.rb
178
+ - lib/generators/thincloud/templates/support/minitest_rails.rb
179
+ - lib/generators/thincloud/templates/support/routing_spec.rb
180
+ - lib/generators/thincloud/test_generator.rb
181
+ - lib/thincloud-test-rails.rb
182
+ - lib/thincloud/test/rails.rb
183
+ - lib/thincloud/test/rails/railtie.rb
184
+ - lib/thincloud/test/rails/version.rb
185
+ - test/dummy/.gitignore
186
+ - test/dummy/Guardfile
187
+ - test/dummy/README.rdoc
188
+ - test/dummy/Rakefile
189
+ - test/dummy/app/assets/javascripts/application.js
190
+ - test/dummy/app/assets/stylesheets/application.css
191
+ - test/dummy/app/controllers/application_controller.rb
192
+ - test/dummy/app/helpers/application_helper.rb
193
+ - test/dummy/app/mailers/.gitkeep
194
+ - test/dummy/app/models/.gitkeep
195
+ - test/dummy/app/views/layouts/application.html.erb
196
+ - test/dummy/config.ru
197
+ - test/dummy/config/application.rb
198
+ - test/dummy/config/boot.rb
199
+ - test/dummy/config/database.yml
200
+ - test/dummy/config/environment.rb
201
+ - test/dummy/config/environments/development.rb
202
+ - test/dummy/config/environments/production.rb
203
+ - test/dummy/config/environments/test.rb
204
+ - test/dummy/config/initializers/backtrace_silencers.rb
205
+ - test/dummy/config/initializers/inflections.rb
206
+ - test/dummy/config/initializers/mime_types.rb
207
+ - test/dummy/config/initializers/secret_token.rb
208
+ - test/dummy/config/initializers/session_store.rb
209
+ - test/dummy/config/initializers/wrap_parameters.rb
210
+ - test/dummy/config/locales/en.yml
211
+ - test/dummy/config/routes.rb
212
+ - test/dummy/lib/assets/.gitkeep
213
+ - test/dummy/lib/tasks/test.rake
214
+ - test/dummy/log/.gitkeep
215
+ - test/dummy/public/404.html
216
+ - test/dummy/public/422.html
217
+ - test/dummy/public/500.html
218
+ - test/dummy/public/favicon.ico
219
+ - test/dummy/script/rails
220
+ - test/dummy/test/factories/.gitkeep
221
+ - test/dummy/test/minitest_helper.rb
222
+ - thincloud-test-rails.gemspec
223
+ homepage: http://newleaders.github.com/thincloud-test-rails
224
+ licenses: []
225
+ post_install_message:
226
+ rdoc_options: []
227
+ require_paths:
228
+ - lib
229
+ required_ruby_version: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - ! '>='
232
+ - !ruby/object:Gem::Version
233
+ version: '0'
234
+ segments:
235
+ - 0
236
+ hash: 181103346141182010
237
+ none: false
238
+ required_rubygems_version: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - ! '>'
241
+ - !ruby/object:Gem::Version
242
+ version: 1.3.1
243
+ none: false
244
+ requirements: []
245
+ rubyforge_project:
246
+ rubygems_version: 1.8.24
247
+ signing_key:
248
+ specification_version: 3
249
+ summary: Opinionated testing framework dependencies and configuration for Rails applications.
250
+ test_files:
251
+ - test/dummy/.gitignore
252
+ - test/dummy/Guardfile
253
+ - test/dummy/README.rdoc
254
+ - test/dummy/Rakefile
255
+ - test/dummy/app/assets/javascripts/application.js
256
+ - test/dummy/app/assets/stylesheets/application.css
257
+ - test/dummy/app/controllers/application_controller.rb
258
+ - test/dummy/app/helpers/application_helper.rb
259
+ - test/dummy/app/mailers/.gitkeep
260
+ - test/dummy/app/models/.gitkeep
261
+ - test/dummy/app/views/layouts/application.html.erb
262
+ - test/dummy/config.ru
263
+ - test/dummy/config/application.rb
264
+ - test/dummy/config/boot.rb
265
+ - test/dummy/config/database.yml
266
+ - test/dummy/config/environment.rb
267
+ - test/dummy/config/environments/development.rb
268
+ - test/dummy/config/environments/production.rb
269
+ - test/dummy/config/environments/test.rb
270
+ - test/dummy/config/initializers/backtrace_silencers.rb
271
+ - test/dummy/config/initializers/inflections.rb
272
+ - test/dummy/config/initializers/mime_types.rb
273
+ - test/dummy/config/initializers/secret_token.rb
274
+ - test/dummy/config/initializers/session_store.rb
275
+ - test/dummy/config/initializers/wrap_parameters.rb
276
+ - test/dummy/config/locales/en.yml
277
+ - test/dummy/config/routes.rb
278
+ - test/dummy/lib/assets/.gitkeep
279
+ - test/dummy/lib/tasks/test.rake
280
+ - test/dummy/log/.gitkeep
281
+ - test/dummy/public/404.html
282
+ - test/dummy/public/422.html
283
+ - test/dummy/public/500.html
284
+ - test/dummy/public/favicon.ico
285
+ - test/dummy/script/rails
286
+ - test/dummy/test/factories/.gitkeep
287
+ - test/dummy/test/minitest_helper.rb