123456789_123456789_123456789_123456789_123456789_

Module: PowerAssert

Relationships & Source Files
Namespace Children
Modules:
Classes:
Defined in: lib/power_assert.rb,
lib/power_assert/configuration.rb,
lib/power_assert/version.rb

Constant Summary

Class Method Summary

Class Method Details

.clear_global_method_cache (private)

[ GitHub ]

  
# File 'lib/power_assert.rb', line 35

def clear_global_method_cache
  eval('using PowerAssert.const_get(:Empty)', TOPLEVEL_BINDING)
end

.configuration

[ GitHub ]

  
# File 'lib/power_assert/configuration.rb', line 3

def configuration
  @configuration ||= Configuration[false, false, true]
end

.configure {|configuration| ... }

Yields:

[ GitHub ]

  
# File 'lib/power_assert/configuration.rb', line 7

def configure
  yield configuration
end

.start(assertion_proc_or_source, assertion_method: nil, source_binding: TOPLEVEL_BINDING) {|Context.new(assertion_proc_or_source, assertion_method, source_binding)| ... }

Yields:

  • (Context.new(assertion_proc_or_source, assertion_method, source_binding))
[ GitHub ]

  
# File 'lib/power_assert.rb', line 25

def start(assertion_proc_or_source, assertion_method: nil, source_binding: TOPLEVEL_BINDING)
  if respond_to?(:clear_global_method_cache, true)
    clear_global_method_cache
  end
  yield Context.new(assertion_proc_or_source, assertion_method, source_binding)
end