Class: Minitest::Spec

Inherits:
Test show all
Extended by:
DSL
Defined in:
lib/minitest/spec.rb

Overview

Minitest::Spec – The faster, better, less-magical spec framework!

For a list of expectations, see Minitest::Expectations.

Defined Under Namespace

Modules: DSL

Constant Summary collapse

TYPES =

:nodoc:

DSL::TYPES

Constants inherited from Test

Test::PASSTHROUGH_EXCEPTIONS

Constants included from Assertions

Assertions::UNDEFINED

Instance Attribute Summary

Attributes included from DSL

#desc

Attributes inherited from Test

#time

Attributes inherited from Runnable

#assertions, #failures

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DSL

after, before, children, create, describe_stack, it, let, name, nuke_test_methods!, register_spec_type, spec_type, subject, to_s

Methods inherited from Test

#capture_exceptions, #capture_io, #capture_subprocess_io, #error?, i_suck_and_my_tests_are_order_dependent!, #location, make_my_diffs_pretty!, #marshal_dump, #marshal_load, old_test_order, parallelize_me!, #passed?, #result_code, #run, runnable_methods, #simple_capture_io, #simple_capture_subprocess_io, #skipped?, synchronize, test_order, #time_it, #to_s, #with_info_handler

Methods included from Guard

#jruby?, #maglev?, #mri?, #rubinius?, #windows?

Methods included from Test::LifecycleHooks

#after_setup, #after_teardown, #before_setup, #before_teardown, #setup, #teardown

Methods included from Assertions

#assert, #assert_empty, #assert_equal, #assert_in_delta, #assert_in_epsilon, #assert_includes, #assert_instance_of, #assert_kind_of, #assert_match, #assert_nil, #assert_operator, #assert_output, #assert_predicate, #assert_raises, #assert_respond_to, #assert_same, #assert_send, #assert_silent, #assert_throws, #capture_io, #capture_subprocess_io, #diff, diff, diff=, #exception_details, #flunk, #message, #mu_pp, #mu_pp_for_diff, #pass, #refute, #refute_empty, #refute_equal, #refute_in_delta, #refute_in_epsilon, #refute_includes, #refute_instance_of, #refute_kind_of, #refute_match, #refute_nil, #refute_operator, #refute_predicate, #refute_respond_to, #refute_same, #skip, #skipped?

Methods inherited from Runnable

#failure, inherited, #marshal_dump, #marshal_load, methods_matching, #name, #name=, on_signal, #passed?, reset, #result_code, run, #run, runnable_methods, runnables, #skipped?, with_info_handler

Constructor Details

#initialize(name) ⇒ Spec

:nodoc:



88
89
90
91
# File 'lib/minitest/spec.rb', line 88

def initialize name # :nodoc:
  super
  Thread.current[:current_spec] = self
end

Class Method Details

.currentObject

:nodoc:



84
85
86
# File 'lib/minitest/spec.rb', line 84

def self.current # :nodoc:
  Thread.current[:current_spec]
end