minitest-rails 0.9.2 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +14 -16
  3. data/Gemfile +7 -0
  4. data/Manifest.txt +12 -9
  5. data/README.rdoc +13 -1
  6. data/Rakefile +6 -5
  7. data/gemfiles/3.0.gemfile +2 -5
  8. data/gemfiles/3.1.gemfile +2 -5
  9. data/gemfiles/3.2.gemfile +2 -5
  10. data/gemfiles/4.0.gemfile +2 -6
  11. data/lib/generators/.document +0 -0
  12. data/lib/generators/mini_test/controller/templates/controller_spec.rb +3 -3
  13. data/lib/generators/mini_test/controller/templates/controller_test.rb +4 -4
  14. data/lib/generators/mini_test/helper/templates/helper_test.rb +1 -1
  15. data/lib/generators/mini_test/install/install_generator.rb +5 -0
  16. data/lib/generators/mini_test/install/templates/test_helper.rb +9 -0
  17. data/lib/generators/mini_test/integration/templates/integration_spec.rb +3 -3
  18. data/lib/generators/mini_test/integration/templates/integration_test.rb +3 -3
  19. data/lib/generators/mini_test/mailer/mailer_generator.rb +2 -2
  20. data/lib/generators/mini_test/mailer/templates/mailer_test.rb +4 -4
  21. data/lib/generators/mini_test/model/model_generator.rb +3 -3
  22. data/lib/generators/mini_test/model/templates/model_spec.rb +2 -4
  23. data/lib/generators/mini_test/model/templates/model_test.rb +9 -3
  24. data/lib/generators/mini_test/route/templates/route_spec.rb +1 -1
  25. data/lib/generators/mini_test/route/templates/route_test.rb +1 -1
  26. data/lib/generators/mini_test/scaffold/templates/controller_spec.rb +12 -14
  27. data/lib/generators/mini_test/scaffold/templates/controller_test.rb +6 -6
  28. data/lib/minitest/rails/assertions.rb +1811 -0
  29. data/lib/minitest/rails/expectations.rb +659 -0
  30. data/lib/minitest/rails/generators.rb +18 -0
  31. data/lib/minitest/rails/railtie.rb +1 -1
  32. data/lib/minitest/rails/tasks/.document +0 -0
  33. data/lib/minitest/rails/tasks/minitest.rake +44 -13
  34. data/lib/minitest/rails/testing.rb +10 -20
  35. data/lib/minitest/rails/version.rb +1 -1
  36. data/lib/minitest/rails.rb +22 -3
  37. data/minitest-rails.gemspec +21 -16
  38. data/tasks/test.rake +27 -15
  39. data/test/generators/test_install_generator.rb +17 -0
  40. data/test/generators/test_mailer_generator.rb +19 -0
  41. data/test/generators/test_model_generator.rb +25 -1
  42. data/test/helper.rb +27 -0
  43. data/test/rails/action_controller/test_assertions.rb +46 -0
  44. data/test/rails/action_controller/test_controllers.rb +2 -13
  45. data/test/rails/action_controller/test_expectations.rb +45 -0
  46. data/test/rails/active_support/test_assertions.rb +59 -0
  47. data/test/rails/active_support/test_expectations.rb +49 -0
  48. data/test/rails/generators/test_spec_type.rb +36 -0
  49. data/test/rails/minitest_5_api_test.rb +8 -0
  50. metadata +66 -54
  51. data/gemfiles/3.0.gemfile.lock +0 -91
  52. data/gemfiles/3.1.gemfile.lock +0 -102
  53. data/gemfiles/3.2.gemfile.lock +0 -101
  54. data/gemfiles/4.0.gemfile.lock +0 -99
  55. data/lib/autotest/discover.rb +0 -5
  56. data/lib/autotest/fixtures.rb +0 -7
  57. data/lib/autotest/migrate.rb +0 -5
  58. data/lib/autotest/minitest_rails.rb +0 -63
  59. data/tasks/gemfiles.rake +0 -24
@@ -1,101 +0,0 @@
1
- PATH
2
- remote: /Users/blowmage/codez/minitest-rails
3
- specs:
4
- minitest-rails (0.9.2.20130405010332)
5
- minitest (~> 4.7)
6
- rails (>= 3.0)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- actionmailer (3.2.13)
12
- actionpack (= 3.2.13)
13
- mail (~> 2.5.3)
14
- actionpack (3.2.13)
15
- activemodel (= 3.2.13)
16
- activesupport (= 3.2.13)
17
- builder (~> 3.0.0)
18
- erubis (~> 2.7.0)
19
- journey (~> 1.0.4)
20
- rack (~> 1.4.5)
21
- rack-cache (~> 1.2)
22
- rack-test (~> 0.6.1)
23
- sprockets (~> 2.2.1)
24
- activemodel (3.2.13)
25
- activesupport (= 3.2.13)
26
- builder (~> 3.0.0)
27
- activerecord (3.2.13)
28
- activemodel (= 3.2.13)
29
- activesupport (= 3.2.13)
30
- arel (~> 3.0.2)
31
- tzinfo (~> 0.3.29)
32
- activeresource (3.2.13)
33
- activemodel (= 3.2.13)
34
- activesupport (= 3.2.13)
35
- activesupport (3.2.13)
36
- i18n (= 0.6.1)
37
- multi_json (~> 1.0)
38
- arel (3.0.2)
39
- builder (3.0.4)
40
- erubis (2.7.0)
41
- fakefs (0.4.2)
42
- hike (1.2.1)
43
- hoe (3.5.2)
44
- rake (>= 0.8, < 11.0)
45
- i18n (0.6.1)
46
- journey (1.0.4)
47
- json (1.7.7)
48
- mail (2.5.3)
49
- i18n (>= 0.4.0)
50
- mime-types (~> 1.16)
51
- treetop (~> 1.4.8)
52
- mime-types (1.22)
53
- minitest (4.7.0)
54
- multi_json (1.7.2)
55
- polyglot (0.3.3)
56
- rack (1.4.5)
57
- rack-cache (1.2)
58
- rack (>= 0.4)
59
- rack-ssl (1.3.3)
60
- rack
61
- rack-test (0.6.2)
62
- rack (>= 1.0)
63
- rails (3.2.13)
64
- actionmailer (= 3.2.13)
65
- actionpack (= 3.2.13)
66
- activerecord (= 3.2.13)
67
- activeresource (= 3.2.13)
68
- activesupport (= 3.2.13)
69
- bundler (~> 1.0)
70
- railties (= 3.2.13)
71
- railties (3.2.13)
72
- actionpack (= 3.2.13)
73
- activesupport (= 3.2.13)
74
- rack-ssl (~> 1.3.2)
75
- rake (>= 0.8.7)
76
- rdoc (~> 3.4)
77
- thor (>= 0.14.6, < 2.0)
78
- rake (10.0.4)
79
- rdoc (3.12.2)
80
- json (~> 1.4)
81
- sprockets (2.2.2)
82
- hike (~> 1.2)
83
- multi_json (~> 1.0)
84
- rack (~> 1.0)
85
- tilt (~> 1.1, != 1.3.0)
86
- thor (0.18.1)
87
- tilt (1.3.6)
88
- treetop (1.4.12)
89
- polyglot
90
- polyglot (>= 0.3.1)
91
- tzinfo (0.3.37)
92
-
93
- PLATFORMS
94
- ruby
95
-
96
- DEPENDENCIES
97
- fakefs (~> 0.4)
98
- hoe (~> 3.0)
99
- minitest-rails!
100
- rails (~> 3.2.11)
101
- rdoc (~> 3.10)
@@ -1,99 +0,0 @@
1
- PATH
2
- remote: /Users/blowmage/codez/minitest-rails
3
- specs:
4
- minitest-rails (0.9.2.20130405010332)
5
- minitest (~> 4.7)
6
- rails (>= 3.0)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- actionmailer (4.0.0.beta1)
12
- actionpack (= 4.0.0.beta1)
13
- mail (~> 2.5.3)
14
- actionpack (4.0.0.beta1)
15
- activesupport (= 4.0.0.beta1)
16
- builder (~> 3.1.0)
17
- erubis (~> 2.7.0)
18
- rack (~> 1.5.2)
19
- rack-test (~> 0.6.2)
20
- activemodel (4.0.0.beta1)
21
- activesupport (= 4.0.0.beta1)
22
- builder (~> 3.1.0)
23
- activerecord (4.0.0.beta1)
24
- activemodel (= 4.0.0.beta1)
25
- activerecord-deprecated_finders (~> 0.0.3)
26
- activesupport (= 4.0.0.beta1)
27
- arel (~> 4.0.0.beta1)
28
- activerecord-deprecated_finders (0.0.3)
29
- activesupport (4.0.0.beta1)
30
- i18n (~> 0.6.2)
31
- minitest (~> 4.2)
32
- multi_json (~> 1.3)
33
- thread_safe (~> 0.1)
34
- tzinfo (~> 0.3.33)
35
- arel (4.0.0.beta2)
36
- atomic (1.1.0)
37
- builder (3.1.4)
38
- erubis (2.7.0)
39
- fakefs (0.4.2)
40
- hike (1.2.1)
41
- hoe (3.5.2)
42
- rake (>= 0.8, < 11.0)
43
- i18n (0.6.4)
44
- json (1.7.7)
45
- mail (2.5.3)
46
- i18n (>= 0.4.0)
47
- mime-types (~> 1.16)
48
- treetop (~> 1.4.8)
49
- mime-types (1.22)
50
- minitest (4.7.0)
51
- multi_json (1.7.2)
52
- polyglot (0.3.3)
53
- rack (1.5.2)
54
- rack-test (0.6.2)
55
- rack (>= 1.0)
56
- rails (4.0.0.beta1)
57
- actionmailer (= 4.0.0.beta1)
58
- actionpack (= 4.0.0.beta1)
59
- activerecord (= 4.0.0.beta1)
60
- activesupport (= 4.0.0.beta1)
61
- bundler (>= 1.3.0, < 2.0)
62
- railties (= 4.0.0.beta1)
63
- sprockets-rails (~> 2.0.0.rc3)
64
- railties (4.0.0.beta1)
65
- actionpack (= 4.0.0.beta1)
66
- activesupport (= 4.0.0.beta1)
67
- rake (>= 0.8.7)
68
- rdoc (~> 3.4)
69
- thor (>= 0.17.0, < 2.0)
70
- rake (10.0.4)
71
- rdoc (3.12.2)
72
- json (~> 1.4)
73
- sprockets (2.9.0)
74
- hike (~> 1.2)
75
- multi_json (~> 1.0)
76
- rack (~> 1.0)
77
- tilt (~> 1.1, != 1.3.0)
78
- sprockets-rails (2.0.0.rc3)
79
- actionpack (>= 3.0)
80
- activesupport (>= 3.0)
81
- sprockets (~> 2.8)
82
- thor (0.18.1)
83
- thread_safe (0.1.0)
84
- atomic
85
- tilt (1.3.6)
86
- treetop (1.4.12)
87
- polyglot
88
- polyglot (>= 0.3.1)
89
- tzinfo (0.3.37)
90
-
91
- PLATFORMS
92
- ruby
93
-
94
- DEPENDENCIES
95
- fakefs (~> 0.4)
96
- hoe (~> 3.0)
97
- minitest-rails!
98
- rails (= 4.0.0.beta1)
99
- rdoc (~> 3.10)
@@ -1,5 +0,0 @@
1
- Autotest.add_discovery do
2
- style = []
3
- style = ["minitest", "rails"] if File.exist? 'config/application.rb'
4
- style
5
- end
@@ -1,7 +0,0 @@
1
- module Autotest::Fixtures
2
- Autotest.add_hook :initialize do |at|
3
- at.test_mappings['^test/fixtures/(.*)s.yml'] = proc { |filename, matches|
4
- at.files_matching(/test\/\w+\/#{matches[1]}(_\w+)?.*_test.rb$/)
5
- }
6
- end
7
- end
@@ -1,5 +0,0 @@
1
- module Autotest::Migrate
2
- Autotest.add_hook(:run) do |autotest|
3
- system "rake db:migrate" if autotest.class.to_s == "MinitestRails"
4
- end
5
- end
@@ -1,63 +0,0 @@
1
- require 'autotest'
2
- require "minitest/rails/version"
3
-
4
- class Autotest::MinitestRails < Autotest
5
- VERSION = MiniTest::Rails::VERSION
6
-
7
- def initialize # :nodoc:
8
- super
9
-
10
- add_exception %r%^\./(?:db|doc|log|public|script|tmp|vendor)%
11
-
12
- clear_mappings
13
-
14
- add_mapping %r%^app/models/(.*)\.rb$% do |_, m|
15
- files_matching %r%^test/models/#{m[1]}.*_test.rb$%
16
- end
17
-
18
- add_mapping %r%^app/controllers/(.*)_controller\.rb$% do |_, m|
19
- if m[1] == "application" then
20
- files_matching %r%^test/(controllers|views)/.*_test\.rb$%
21
- else
22
- files_matching %r%^test/(controllers|views)/#{m[1]}.*_test.rb$%
23
- end
24
- end
25
-
26
- add_mapping %r%^app/helpers/(.*)_helper.rb% do |_, m|
27
- if m[1] == "application" then
28
- files_matching %r%^test/(helpers|views|controllers)/.*_test\.rb$%
29
- else
30
- files_matching %r%^test/(helpers|views|controllers)/#{m[1]}.*_test.rb$%
31
- end
32
- end
33
-
34
- add_mapping %r%^app/views/(.*)/% do |_, m|
35
- files_matching %r%^test/(controllers|views)/#{m[1]}.*_test.rb$%
36
- end
37
-
38
- add_mapping %r%^app/mailers/(.*)\.rb$% do |_, m|
39
- files_matching %r%^test/mailers/#{m[1]}.*_test.rb$%
40
- end
41
-
42
-
43
- add_mapping %r%^app/lib/(.*)\.rb$% do |_, m|
44
- files_matching %r%^test/lib/#{m[1]}.*_test.rb$%
45
- end
46
-
47
- add_mapping %r%^test/.*_test\.rb$% do |filename, _|
48
- filename
49
- end
50
-
51
- add_mapping %r%^test/fixtures/(.*)s.yml% do |_, m|
52
- files_matching %r%^test/(models|controllers|views)/#{m[1]}.*_test.rb$%
53
- end
54
-
55
- add_mapping %r%^config/routes.rb$% do # FIX:
56
- files_matching %r%^test/(controllers|views|acceptance)/.*_test\.rb$%
57
- end
58
-
59
- add_mapping %r%^test/*_helper.rb|config/((boot|environment(s/test)?).rb|database.yml)% do
60
- files_matching %r%^test/(models|controllers|views|lib|acceptance)/.*_test\.rb$%
61
- end
62
- end
63
- end
data/tasks/gemfiles.rake DELETED
@@ -1,24 +0,0 @@
1
- namespace :gemfiles do
2
- desc "Updates the gemfiles"
3
- task :update do
4
- `bundle --gemfile=gemfiles/3.0.gemfile`
5
- `bundle --gemfile=gemfiles/3.1.gemfile`
6
- `bundle --gemfile=gemfiles/3.2.gemfile`
7
- `bundle --gemfile=gemfiles/4.0.gemfile`
8
- end
9
- desc "Clear the gemfile lock files"
10
- task :clear do
11
- `rm gemfiles/*.gemfile.lock`
12
- end
13
- end
14
-
15
- # Building this in case it doesn't exist
16
- # /me shakes fist at travis-ci
17
- namespace :gem do
18
- task :spec do
19
- end
20
- end
21
-
22
- Rake::Task["gem:spec"].enhance do
23
- Rake::Task["gemfiles:update"].invoke
24
- end