Module: Minitest::Smartdiff
- Extended by:
- Forwardable
- Defined in:
- lib/minitest/smartdiff.rb,
lib/minitest/smartdiff/version.rb
Defined Under Namespace
Modules: ClassMethods
Classes: Error
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(base) ⇒ Object
14
15
16
|
# File 'lib/minitest/smartdiff.rb', line 14
def self.included(base)
base.extend ClassMethods
end
|
Instance Method Details
#smart_diff ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/minitest/smartdiff.rb', line 26
def smart_diff
raise ArgumentError, "Expected a block but none was given" unless block_given?
smart_diff_on
yield
ensure
smart_diff_off
end
|
#smart_diff_off ⇒ Object
18
19
20
|
# File 'lib/minitest/smartdiff.rb', line 18
def smart_diff_off
@smart_diff = false
end
|
#smart_diff_on ⇒ Object
22
23
24
|
# File 'lib/minitest/smartdiff.rb', line 22
def smart_diff_on
@smart_diff = true
end
|