minitest-rails 2.2.1 → 3.0.0.rc1

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 +4 -4
  2. data/.travis.yml +8 -6
  3. data/CHANGELOG.rdoc +0 -6
  4. data/Gemfile +1 -1
  5. data/Manifest.txt +6 -13
  6. data/Rakefile +4 -3
  7. data/gemfiles/5.0.gemfile +5 -0
  8. data/gemfiles/head.gemfile +5 -0
  9. data/lib/generators/minitest/controller/templates/controller_spec.rb +9 -5
  10. data/lib/generators/minitest/controller/templates/controller_test.rb +9 -5
  11. data/lib/generators/minitest/generator/generator_generator.rb +2 -3
  12. data/lib/generators/minitest/generator/templates/generator_spec.rb +1 -1
  13. data/lib/generators/minitest/generator/templates/generator_test.rb +1 -1
  14. data/lib/generators/minitest/helper/helper_generator.rb +1 -11
  15. data/lib/generators/minitest/integration/integration_generator.rb +1 -2
  16. data/lib/generators/minitest/integration/templates/integration_spec.rb +3 -3
  17. data/lib/generators/minitest/integration/templates/integration_test.rb +3 -3
  18. data/lib/generators/minitest/job/job_generator.rb +2 -3
  19. data/lib/generators/minitest/job/templates/job_spec.rb +3 -3
  20. data/lib/generators/minitest/job/templates/job_test.rb +3 -3
  21. data/lib/generators/minitest/mailer/mailer_generator.rb +9 -4
  22. data/lib/generators/minitest/mailer/templates/mailer_spec.rb +4 -4
  23. data/lib/generators/minitest/mailer/templates/mailer_test.rb +5 -5
  24. data/lib/generators/minitest/mailer/templates/preview.rb +5 -5
  25. data/lib/generators/minitest/model/model_generator.rb +3 -4
  26. data/lib/generators/minitest/model/templates/fixtures.yml +17 -12
  27. data/lib/generators/minitest/scaffold/scaffold_generator.rb +24 -3
  28. data/lib/generators/minitest/scaffold/templates/api_controller_spec.rb +42 -0
  29. data/lib/generators/minitest/scaffold/templates/api_controller_test.rb +44 -0
  30. data/lib/generators/minitest/scaffold/templates/controller_spec.rb +14 -11
  31. data/lib/generators/minitest/scaffold/templates/controller_test.rb +17 -14
  32. data/lib/minitest/rails.rb +10 -27
  33. data/lib/minitest/rails/assertions.rb +0 -561
  34. data/lib/minitest/rails/expectations.rb +0 -63
  35. data/lib/minitest/rails/version.rb +1 -1
  36. data/minitest-rails.gemspec +13 -10
  37. data/tasks/test.rake +8 -8
  38. data/test/generators/test_helper_generator.rb +8 -16
  39. data/test/generators/test_mailer_generator.rb +16 -17
  40. data/test/generators/test_model_generator.rb +1 -1
  41. data/test/generators/test_scaffold_generator.rb +2 -2
  42. data/test/helper.rb +16 -1
  43. data/test/rails/{action_controller → action_dispatch}/test_assertions.rb +4 -11
  44. data/test/rails/{action_controller → action_dispatch}/test_expectations.rb +4 -11
  45. data/test/rails/action_dispatch/test_spec_type.rb +6 -18
  46. data/test/rails/action_mailer/test_mailers.rb +6 -6
  47. data/test/rails/action_view/test_helpers.rb +2 -2
  48. metadata +28 -21
  49. data/gemfiles/4.1.gemfile +0 -5
  50. data/gemfiles/4.2.gemfile +0 -5
  51. data/lib/generators/minitest/helper/templates/helper_spec.rb +0 -9
  52. data/lib/generators/minitest/helper/templates/helper_test.rb +0 -9
  53. data/lib/generators/minitest/route/route_generator.rb +0 -28
  54. data/lib/generators/minitest/route/templates/route_spec.rb +0 -13
  55. data/lib/generators/minitest/route/templates/route_test.rb +0 -13
  56. data/test/generators/test_route_generator.rb +0 -24
  57. data/test/rails/action_controller/test_controllers.rb +0 -202
  58. data/test/rails/action_controller/test_spec_type.rb +0 -47
  59. data/test/rails/minitest_5_api_test.rb +0 -8
@@ -1,47 +0,0 @@
1
- require "helper"
2
-
3
- class ApplicationController < ActionController::Base; end
4
- class ModelsController < ApplicationController; end
5
-
6
- class TestApplicationControllerSpecType < Minitest::Test
7
- def assert_controller actual
8
- assert_equal ActionController::TestCase, actual
9
- end
10
-
11
- def refute_controller actual
12
- refute_equal ActionController::TestCase, actual
13
- end
14
-
15
- def test_spec_type_resolves_for_class_constants
16
- assert_controller Minitest::Spec.spec_type(ApplicationController)
17
- assert_controller Minitest::Spec.spec_type(ModelsController)
18
- end
19
-
20
- def test_spec_type_resolves_for_matching_strings
21
- assert_controller Minitest::Spec.spec_type("WidgetController")
22
- assert_controller Minitest::Spec.spec_type("WidgetControllerTest")
23
- assert_controller Minitest::Spec.spec_type("Widget Controller Test")
24
- # And is not case sensitive
25
- assert_controller Minitest::Spec.spec_type("widgetcontroller")
26
- assert_controller Minitest::Spec.spec_type("widgetcontrollertest")
27
- assert_controller Minitest::Spec.spec_type("widget controller test")
28
- end
29
-
30
- def test_spec_type_wont_match_non_space_characters
31
- refute_controller Minitest::Spec.spec_type("Widget Controller\tTest")
32
- refute_controller Minitest::Spec.spec_type("Widget Controller\rTest")
33
- refute_controller Minitest::Spec.spec_type("Widget Controller\nTest")
34
- refute_controller Minitest::Spec.spec_type("Widget Controller\fTest")
35
- refute_controller Minitest::Spec.spec_type("Widget ControllerXTest")
36
- end
37
-
38
- def test_spec_type_doesnt_resolve_random_strings
39
- refute_controller Minitest::Spec.spec_type("Unmatched String")
40
- end
41
-
42
- def test_spec_type_resolves_for_additional_desc_controller
43
- assert_controller Minitest::Spec.spec_type("Unmatched String", :controller)
44
- assert_controller Minitest::Spec.spec_type("Unmatched String", :controller, :other)
45
- assert_controller Minitest::Spec.spec_type("Unmatched String", :other, :controller)
46
- end
47
- end
@@ -1,8 +0,0 @@
1
- require "helper"
2
-
3
- class SupportMinitest5APITest < Minitest::Test
4
- def test_sanity
5
- # change to false and watch it fail to make sure it runs
6
- assert true
7
- end
8
- end