Sha256: 2b42575bff08d69f9d6a04d2334b41684e908a357c2e8fad13c4c2c4c2499354
Contents?: true
Size: 1.94 KB
Versions: 22
Compression:
Stored size: 1.94 KB
Contents
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") # And is case sensitive 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") 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") # And is case sensitive 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") end private def assert_dispatch(actual) assert_equal ActionDispatch::IntegrationTest, actual end def refute_dispatch(actual) refute_equal ActionDispatch::IntegrationTest, actual end end
Version data entries
22 entries across 22 versions & 2 rubygems