test/cases/action_controller_test.rb in minitest-spec-rails-5.4.0 vs test/cases/action_controller_test.rb in minitest-spec-rails-5.5.0
- old
+ new
@@ -1,41 +1,38 @@
require 'test_helper'
class ModelsController < ApplicationController; end
class ActionControllerTest < MiniTestSpecRails::TestCase
-
it 'matches spec type for class constants' do
assert_controller MiniTest::Spec.spec_type(ApplicationController)
assert_controller MiniTest::Spec.spec_type(ModelsController)
end
it 'matches spec type for strings' do
- assert_controller MiniTest::Spec.spec_type("WidgetController")
- assert_controller MiniTest::Spec.spec_type("WidgetControllerTest")
- assert_controller MiniTest::Spec.spec_type("Widget Controller Test")
+ 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 case sensitive
- refute_controller MiniTest::Spec.spec_type("widgetcontroller")
- refute_controller MiniTest::Spec.spec_type("widgetcontrollertest")
- refute_controller MiniTest::Spec.spec_type("widget controller test")
+ refute_controller MiniTest::Spec.spec_type('widgetcontroller')
+ refute_controller MiniTest::Spec.spec_type('widgetcontrollertest')
+ refute_controller MiniTest::Spec.spec_type('widget controller test')
end
it 'wont match spec type for non space characters' do
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")
+ refute_controller MiniTest::Spec.spec_type('Widget ControllerXTest')
end
-
private
def assert_controller(actual)
assert_equal ActionController::TestCase, actual
end
def refute_controller(actual)
refute_equal ActionController::TestCase, actual
end
-
end