Sha256: d28b68f217688ab126cc25662aa7fdd293e32998eae7631f451aa25a01219df5

Contents?: true

Size: 801 Bytes

Versions: 2

Compression:

Stored size: 801 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 if described_class
        else
          describing_class.tests described_class if described_class
        end
        super
      end

    end
  end
end

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

Version data entries

2 entries across 2 versions & 1 rubygems

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