test/cases/action_dispatch_test.rb in minitest-spec-rails-5.4.0 vs test/cases/action_dispatch_test.rb in minitest-spec-rails-5.5.0
- old
+ new
@@ -1,50 +1,47 @@
require 'test_helper'
class ModelsController < ApplicationController; end
class ActionControllerTest < MiniTestSpecRails::TestCase
-
it 'resolves spec type for matching acceptance strings' do
- assert_dispatch MiniTest::Spec.spec_type("WidgetAcceptanceTest")
- assert_dispatch MiniTest::Spec.spec_type("Widget Acceptance Test")
+ assert_dispatch MiniTest::Spec.spec_type('WidgetAcceptanceTest')
+ assert_dispatch MiniTest::Spec.spec_type('Widget Acceptance Test')
# And is case sensitive
- refute_dispatch MiniTest::Spec.spec_type("widgetacceptancetest")
- refute_dispatch MiniTest::Spec.spec_type("widget acceptance test")
+ refute_dispatch MiniTest::Spec.spec_type('widgetacceptancetest')
+ refute_dispatch MiniTest::Spec.spec_type('widget acceptance test')
end
it 'wont match spec type for space characters in acceptance strings' do
refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\tTest")
refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\rTest")
refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\nTest")
refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\fTest")
- refute_dispatch MiniTest::Spec.spec_type("Widget AcceptanceXTest")
+ refute_dispatch MiniTest::Spec.spec_type('Widget AcceptanceXTest')
end
it 'resolves spec type for matching integration strings' do
- assert_dispatch MiniTest::Spec.spec_type("WidgetIntegrationTest")
- assert_dispatch MiniTest::Spec.spec_type("Widget Integration Test")
+ assert_dispatch MiniTest::Spec.spec_type('WidgetIntegrationTest')
+ assert_dispatch MiniTest::Spec.spec_type('Widget Integration Test')
# And is case sensitive
- refute_dispatch MiniTest::Spec.spec_type("widgetintegrationtest")
- refute_dispatch MiniTest::Spec.spec_type("widget integration test")
+ refute_dispatch MiniTest::Spec.spec_type('widgetintegrationtest')
+ refute_dispatch MiniTest::Spec.spec_type('widget integration test')
end
it 'wont match spec type for space characters in integration strings' do
refute_dispatch MiniTest::Spec.spec_type("Widget Integration\tTest")
refute_dispatch MiniTest::Spec.spec_type("Widget Integration\rTest")
refute_dispatch MiniTest::Spec.spec_type("Widget Integration\nTest")
refute_dispatch MiniTest::Spec.spec_type("Widget Integration\fTest")
- refute_dispatch MiniTest::Spec.spec_type("Widget IntegrationXTest")
+ refute_dispatch MiniTest::Spec.spec_type('Widget IntegrationXTest')
end
-
private
def assert_dispatch(actual)
assert_equal ActionDispatch::IntegrationTest, actual
end
def refute_dispatch(actual)
refute_equal ActionDispatch::IntegrationTest, actual
end
-
end