Sha256: 3712fd34ad97f9529607fcd5111db41ae6b83223db74454b15cc210a185055c5

Contents?: true

Size: 770 Bytes

Versions: 9

Compression:

Stored size: 770 Bytes

Contents

module Shoulda
  module Matchers
    module Integrations
      module Libraries
        # @private
        class ActionController
          Integrations.register_library(self, :action_controller)

          include Integrations::Inclusion
          include Integrations::Rails

          def integrate_with(test_framework)
            test_framework.include(matchers_module, type: :controller)

            include_into(::ActionController::TestCase, matchers_module) do
              def subject # rubocop:disable Lint/NestedMethodDefinition
                @controller
              end
            end
          end

          private

          def matchers_module
            Shoulda::Matchers::ActionController
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
shoulda-matchers-6.1.0 lib/shoulda/matchers/integrations/libraries/action_controller.rb
shoulda-matchers-6.0.0 lib/shoulda/matchers/integrations/libraries/action_controller.rb
shoulda-matchers-5.3.0 lib/shoulda/matchers/integrations/libraries/action_controller.rb
shoulda-matchers-5.2.0 lib/shoulda/matchers/integrations/libraries/action_controller.rb
shoulda-matchers-5.1.0 lib/shoulda/matchers/integrations/libraries/action_controller.rb
shoulda-matchers-5.0.0 lib/shoulda/matchers/integrations/libraries/action_controller.rb
shoulda-matchers-5.0.0.rc1 lib/shoulda/matchers/integrations/libraries/action_controller.rb
shoulda-matchers-4.5.1 lib/shoulda/matchers/integrations/libraries/action_controller.rb
shoulda-matchers-4.5.0 lib/shoulda/matchers/integrations/libraries/action_controller.rb