diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-31 14:03:55 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-31 14:03:55 -0300 |
commit | b22c527e65a41da59dbfcb078968069c6fae5086 (patch) | |
tree | fd50b9a5b79cf2e3cd508032aec320c0280b5b99 /actionpack/test/controller/spec_type_test.rb | |
parent | 5e5107430bccc0a536e0b264c951793d8fe62235 (diff) | |
parent | cf4afc4d11556609802f640135cc7715e4a6a9fe (diff) | |
download | rails-b22c527e65a41da59dbfcb078968069c6fae5086.tar.gz rails-b22c527e65a41da59dbfcb078968069c6fae5086.tar.bz2 rails-b22c527e65a41da59dbfcb078968069c6fae5086.zip |
Merge branch 'minitest_cleanup'
Diffstat (limited to 'actionpack/test/controller/spec_type_test.rb')
-rw-r--r-- | actionpack/test/controller/spec_type_test.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/actionpack/test/controller/spec_type_test.rb b/actionpack/test/controller/spec_type_test.rb deleted file mode 100644 index 13be8a3405..0000000000 --- a/actionpack/test/controller/spec_type_test.rb +++ /dev/null @@ -1,37 +0,0 @@ -require "abstract_unit" - -class ApplicationController < ActionController::Base; end -class ModelsController < ApplicationController; end - -class ActionControllerSpecTypeTest < ActiveSupport::TestCase - def assert_controller actual - assert_equal ActionController::TestCase, actual - end - - def refute_controller actual - refute_equal ActionController::TestCase, actual - end - - def test_spec_type_resolves_for_class_constants - assert_controller MiniTest::Spec.spec_type(ApplicationController) - assert_controller MiniTest::Spec.spec_type(ModelsController) - end - - def test_spec_type_resolves_for_matching_strings - assert_controller MiniTest::Spec.spec_type("WidgetController") - assert_controller MiniTest::Spec.spec_type("WidgetControllerTest") - assert_controller MiniTest::Spec.spec_type("Widget Controller Test") - # And is not case sensitive - assert_controller MiniTest::Spec.spec_type("widgetcontroller") - assert_controller MiniTest::Spec.spec_type("widgetcontrollertest") - assert_controller MiniTest::Spec.spec_type("widget controller test") - end - - def test_spec_type_wont_match_non_space_characters - refute_controller MiniTest::Spec.spec_type("Widget Controller\tTest") - refute_controller MiniTest::Spec.spec_type("Widget Controller\rTest") - refute_controller MiniTest::Spec.spec_type("Widget Controller\nTest") - refute_controller MiniTest::Spec.spec_type("Widget Controller\fTest") - refute_controller MiniTest::Spec.spec_type("Widget ControllerXTest") - end -end |