Sha256: 68998efc687d0082512a56d38648edeb94798909ea0903d3e8b562dd73206745

Contents?: true

Size: 622 Bytes

Versions: 8

Compression:

Stored size: 622 Bytes

Contents

# frozen_string_literal: true

require_relative './base_assert_required_parameter'

module MiniTest
  # Adding custom assertions to make specs easier to read
  module Assertions
    # Actual test logic for `#assert_requires_static_call_paramr`.
    class AssertRequiresStaticCallParam < BaseAssertRequiredParameter
      private

      def default_message_for(param_key)
        "missing keyword: #{param_key}"
      end

      def error_class
        ArgumentError
      end

      def error_inducer
        -> { klass.call params }
      end
    end # class MiniTest::Assertions::AssertRequiresStaticCallParam
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
prolog_minitest_matchers-0.5.4 lib/prolog_minitest_matchers/matchers/asserters/assert_requires_static_call_param.rb
prolog_minitest_matchers-0.5.3 lib/prolog_minitest_matchers/matchers/asserters/assert_requires_static_call_param.rb
prolog_minitest_matchers-0.5.2 lib/prolog_minitest_matchers/matchers/asserters/assert_requires_static_call_param.rb
prolog_minitest_matchers-0.5.1 lib/prolog_minitest_matchers/matchers/asserters/assert_requires_static_call_param.rb
prolog_minitest_matchers-0.5.0 lib/prolog_minitest_matchers/matchers/asserters/assert_requires_static_call_param.rb
prolog_minitest_matchers-0.4.0 lib/prolog_minitest_matchers/matchers/asserters/assert_requires_static_call_param.rb
prolog_minitest_matchers-0.3.1 lib/prolog_minitest_matchers/matchers/asserters/assert_requires_static_call_param.rb
prolog_minitest_matchers-0.3.0 lib/prolog_minitest_matchers/matchers/asserters/assert_requires_static_call_param.rb