Sha256: f06982d482ed5f7b9e4da71d41e162cc9f4e5a59009aa7578bbcee0133c335a7

Contents?: true

Size: 1.2 KB

Versions: 53

Compression:

Stored size: 1.2 KB

Contents

# <!-- rdoc-file=lib/minitest/spec.rb -->
# Rdoc... why are you so dumb?
#
module Minitest::Spec::DSL::InstanceMethods
  # <!--
  #   rdoc-file=lib/minitest/spec.rb
  #   - _(value = nil, &block)
  # -->
  # Takes a value or a block and returns a value monad that has all of
  # Expectations methods available to it.
  #
  #     _(1 + 1).must_equal 2
  #
  # And for blocks:
  #
  #     _ { 1 + "1" }.must_raise TypeError
  #
  # This method of expectation-based testing is preferable to straight-expectation
  # methods (on Object) because it stores its test context, bypassing our hacky
  # use of thread-local variables.
  #
  # NOTE: At some point, the methods on Object will be deprecated and then
  # removed.
  #
  # It is also aliased to #value and #expect for your aesthetic pleasure:
  #
  #          _(1 + 1).must_equal 2
  #      value(1 + 1).must_equal 2
  #     expect(1 + 1).must_equal 2
  #
  def _: (?untyped? value) ?{ () -> untyped } -> untyped

  # <!--
  #   rdoc-file=lib/minitest/spec.rb
  #   - value(value = nil, &block)
  # -->
  #
  alias value _

  # <!--
  #   rdoc-file=lib/minitest/spec.rb
  #   - expect(value = nil, &block)
  # -->
  #
  alias expect _

  def before_setup: () -> untyped
end

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
rbs-3.7.0.dev.1 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.6.1 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.6.0 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.6.0.pre.3 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.6.0.pre.2 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.6.0.pre.1 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.6.0.dev.1 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.5.3 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.5.2 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.5.1 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.5.1.pre.1 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.5.0 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.5.0.pre.2 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.5.0.pre.1 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.4.4 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.4.3 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.4.2 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
getargv-0.3.3-universal-darwin vendor/bundle/ruby/3.3.0/gems/rbs-2.8.4/stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.4.1 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs
rbs-3.4.0 stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs