module Spec::Example::ExampleGroupMethods

Constants

DeepTestAllBlockWarning

Private Class Methods

assign_instance_method_to_constant(proposed_constant) click to toggle source
# File lib/deep_test/spec/extensions/example_group_methods.rb, line 5
def assign_instance_method_to_constant(proposed_constant)
  method_sym = proposed_constant.to_s.downcase

  unless const_defined?(proposed_constant)
    const_set(proposed_constant, instance_method(method_sym))
  end
end

Public Instance Methods

after(*args, &block)
Alias for: append_after
append_after(*args, &block) click to toggle source
# File lib/deep_test/spec/extensions/example_group_methods.rb, line 38
def append_after(*args, &block)
  check_filter_args(args)
  call_regular_instance_method :append_after, *args, &block
end
Also aliased as: after
append_before(*args, &block) click to toggle source
# File lib/deep_test/spec/extensions/example_group_methods.rb, line 26
def append_before(*args, &block)
  check_filter_args(args)
  call_regular_instance_method :append_before, *args, &block
end
Also aliased as: before
before(*args, &block)
Alias for: append_before
prepend_after(*args, &block) click to toggle source
# File lib/deep_test/spec/extensions/example_group_methods.rb, line 33
def prepend_after(*args, &block)
  check_filter_args(args)
  call_regular_instance_method :prepend_after, *args, &block
end
prepend_before(*args, &block) click to toggle source
# File lib/deep_test/spec/extensions/example_group_methods.rb, line 21
def prepend_before(*args, &block)
  check_filter_args(args)
  call_regular_instance_method :prepend_before, *args, &block
end

Private Instance Methods

call_regular_instance_method(sym, *args, &block) click to toggle source
# File lib/deep_test/spec/extensions/example_group_methods.rb, line 59
def call_regular_instance_method(sym, *args, &block)
  ExampleGroupMethods.const_get(sym.to_s.upcase).bind(self).call(*args, &block)
end
check_filter_args(args) click to toggle source
# File lib/deep_test/spec/extensions/example_group_methods.rb, line 52
def check_filter_args(args)
  if args.first == :all && $show_deep_test_all_block_warning
    $show_deep_test_all_block_warning = false
    $stderr.puts DeepTestAllBlockWarning 
  end
end