Sha256: c242133d4c928c51ba649cb73571638216c1eb0e94f3cb61846222294f2a1243

Contents?: true

Size: 763 Bytes

Versions: 1

Compression:

Stored size: 763 Bytes

Contents

module MiniTestSpecRails
  module Init
    module ActionControllerBehavior

      extend ActiveSupport::Concern

      included do
        register_spec_type(self) { |desc| Class === desc && desc < ActionController::Metal }
        register_spec_type(/Controller( ?Test)?\z/, self)
        register_spec_type(self) { |desc| Class === desc && desc < self }
        register_rails_test_case self
      end

      private

      def setup_controller_request_and_response
        if Util.rails30? || Util.rails31?
          self.class.tests described_class
        else
          describing_class.tests described_class
        end
        super
      end

    end
  end
end

ActionController::TestCase.send :include, MiniTestSpecRails::Init::ActionControllerBehavior

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minitest-spec-rails-4.7.9 lib/minitest-spec-rails/init/action_controller.rb