Module: PowerAssert
- Defined in:
- lib/power_assert.rb,
lib/power_assert/version.rb,
lib/power_assert/configuration.rb
Constant Summary collapse
- VERSION =
"0.4.0"
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|configuration| ... } ⇒ Object
- .start(assertion_proc_or_source, assertion_method: nil, source_binding: TOPLEVEL_BINDING) {|Context.new(assertion_proc_or_source, assertion_method, source_binding)| ... } ⇒ Object
Class Method Details
.configuration ⇒ Object
3 4 5 |
# File 'lib/power_assert/configuration.rb', line 3 def configuration @configuration ||= Configuration[false, false, true] end |
.configure {|configuration| ... } ⇒ Object
7 8 9 |
# 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)| ... } ⇒ Object
25 26 27 28 29 30 |
# 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 |